Search code examples
dynamics-crm-2011crm

Changing Timeout value


I'm getting a lot of these related errors in the event log. In general the query execution time is only showing 10-11 seconds of execution time.

enter image description here

How can I go about adjusting this time-out to 30 seconds? I've checked https://social.technet.microsoft.com/wiki/contents/articles/12601.crm-2011-timeouts-and-limits.aspx , but these registry values don't look to exist within my server.

enter image description here


Solution

  • The application Event log warnings with Event ID 17972 will show all Microsoft SQL Queries that are generated by the Microsoft CRM platform that take longer than 10 seconds. The timeout that you are thinking of related to CRM Platform SQL queries is this one below and needs to be set in the registry of the Microsoft CRM Server, noting that if it doesn't exist, it's going to default to a value of 30 seconds. By default Microsoft does not add this registry key to a Microsoft CRM Server.

    HKEY_LOCAL_MACHINE\Software\Microsoft\MSCRM\OLEDBTimeout as a REG_DWORD key. If this key doesn't exist, the default is 30 decimal. This should be set on each of your Microsoft CRM or Microsoft Dynamics 365 servers if you have multiple servers in a deployment. The new timeout setting takes effect immediately and does not require a server reboot or a restart of any services. I usually recommend customers to set this between 60 decimal and 600 decimal, which would be the equivalent of 1 minute to 10 minutes for a timeout. This is one of those scenarios where more is not always better since a long running query can cause slowness for everyone and it may be better to have a single user's query from CRM timeout after 1 minute vs. it running for an extended period of time and causing slowness for all users.

    Ideally you will either tune the Microsoft SQL queries generated, reduce the amount of data stored in Microsoft CRM, or improve the overall performance of the Microsoft SQL Server with better hardware. Most queries for CRM should be executing in less than a second and if you are seeing numerous events with these 10 second or longer queries, it's an indication that there may be some performance issues occuring. Note that depending on the number of users, the operations those users are performing, and the amount of data in Microsoft CRM, it will be normal to see longer queries happen occasionally. If they occur frequently, that's the time to start looking at tuning. You can use these events from the application event log as a starting point for investigating what queries to tune in Microsoft SQL Server.