Share via


CRM 4.0 Email Router - When the customer has a high load on the email router he receive errors in the email router

In CRM 4.0 Email Router, when a user has a high load on the email router he/ she receives an errors in the email router and application log

Fehler: #14494 - A provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider has been aborted because it has been running for longer than the allowed execution time. This behavior may occur when there is a problem with the network or because the e-mail server is busy. Verify that you can log on to the e-mail server by using an e-mail application that uses the account specified for the E-mail Router.

CAUSE:

Timeout is caused of insufficient TCP ports

RESOLUTION:

This usually happens when the mailbox has a lot of mails inside and when a lot of communication to exchange server is performed (e.g. a lot of Outlook users are connected).

The WebDAV timeout is caused due to insufficient TCP ports on the Exchange and CRM servers. We have some steps to be done in order to resolve the issue. First one is described on the blog:

https://blogs.msdn.com/b/benlec/archive/2009/09/30/microsoft-dynamics-crm-4-0-e-mail-router-unexpectedly-stalls.aspx

 

If the change according to the blog does not help, you should continue:

Increase the maxthreadexecution in the C:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.xml and e-mail router service restart afterwards

<MaxThreadExecution>1200000</MaxThreadExecution>

A great approach here is to decrease the maxmessagespercycle (I recommend 250) and increase the pollingperiod (120). This can be done in the same file or in incoming profiles configuration.

If nothing from this helps you should follow the steps below.

Increase the default number of ports that are available for program traffic. The number of additional ports must be sufficient to handle the number of simultaneous network requests that are being made by all programs. The number of allocated ports is governed by a MaxUserPort registry entry. Additionally, I would like to lower the amount of time it takes for closed connections to release the connection they had opened. By default, a closed connection remains in a TimedWait delay for five minutes after the connection had been closed. This means that the port is still being utilized until that connection has been released. By default, this entry does not exist.

 

To create this entry, follow these steps. Please do this on the CRM and Exchange server.

1. Click Start, click Run, type regedit , and then click OK.

2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters

3. Click Edit, point to New, click DWORD Value, and then type MaxUserPort .

4. Double-click MaxUserPort, and then enter 65534.

Note: This value controls the number of dynamic ports that are available. The valid range for this value is 5,000-65,534. Specifically, this parameter controls the maximum port number that is used when a program requests any available user port from the system.

5. Locate the following registry subkey:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters

6. Click Edit, point to New, click DWORD Value, and then type TcpTimedWaitDelay .

7. Double-click TcpTimedWaitDelay, and then set a decimal value of 30.

Note This parameter determines the length of time that a connection stays in the TIME_WAIT state when it is closed. When a connection is in the TIME_WAIT state, the socket pair cannot be re-used. This is also known as the "2MSL" state. Typically, this value is two times the maximum segment life time on the network.

8. Exit Registry Editor.

9. Restart the Exchange and CRM server.

 

Thank You