Microsoft Dynamics CRM Timeout settings

There are a handful of timeout settings that can affect Dynamics CRM.  In most situations the default setting is sufficient for these and they don’t need to be changed, however, there are times (such as during an upgrade) when these might need to be adjusted to let a certain process complete, or if a user is waiting too long for a process only to fail in the end--these settings can be adjusted; they can be confusing since many have different defaults and are in different units.  Below are some of the timeout settings available with a little more detail to help clear up the confusion.

  1. Registry on CRM application server(s)
      1. In seconds
      2. The OLEDBTimeout value controls the SQL time-out value that is used for a single SQL query
      3. Default is 30 seconds
      1. In milliseconds
      2. The ExtendedTimeout value controls the ASP.NET time-out value
      3. Default is 1,000,000
      1. In milliseconds
      2. Specifies the SOAP call timeout for most operations
      3. Default is 300,000
  2. Web.config
    1. <httpRuntime executionTimeout="300" />
      1. .NET 3.0: “timespan” attribute.  The default is “00:01:50” (110 seconds)
      2. .NET 3.5 and 4.0: an integer in seconds.  Default is 110 seconds.
      3. Specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.
  3. IIS/ASP.NET configuration
    1. IIS 6.0 -> Website Properties -> ASP.NET tab -> Edit Configuration button -> Application tab -> Request execution timeout (seconds)
      1. Related to this type of situation in CRM 4.0:
  4. When using the CRM SDK, there are also timeout settings that can be set via custom code:
    1. CRM 4.0 example:
      1. CrmService service = new CrmService();
      2. service.Timeout = 300;
      3. In milliseconds and default is 100,000
    2. CRM 2011:
      1. ServiceProxy.Timeout property (Timespan)
Comments (6)

  1. .IIS/ASP.NET configuration for IIS 7.0 says:

    I am getting the 1309 error with Dynamics CRM v4 on a Windows 2008 server using IIS 7.0.  How is the ASPX timeout set in IIS 7.0?  



  2. Casper Jensen says:

    Are there any Timeout that can be set for the MSSQL Express 2008 on the Outlook Client? We can see that it sometimes gets timeout after 180 sec..

  3. Chad Rexin says:

    If you ever see timeout errors like the following in the CRM platform trace files, you can adjust those settings in CRM 2011 OnPremise deployments.  CRM Online is limited to the default setting of 2 minutes.  Ideally the sandboxed plugins code should be reviewed to improve the performance so they do not time out.

    errorCode: 0x80044172; message: The plug-in execution failed because the operation has timed-out at the Sandbox Host.

    errorCode: 0x80044171; message: The plug-in execution failed because the operation has timed-out at the Sandbox Client.

    HKLMSoftwareMicrosoftMSCRMSandboxClientOperationTimeoutInSec as a REG_DWORD key with a value in decimal greater than 120 (default is 120, which is equivalent to 2 minutes).

    HKLMSoftwareMicrosoftMSCRMSandboxHostOperationTimeoutInSec as a REG_DWORD key with a value in decimal greater than 120 (default is 120, which is equivalent to 2 minutes).  

    HKLMSoftwareMicrosoftMSCRMSandboxWorkerOperationTimeoutInSec as a REG_DWORD key with a value in decimal greater than 120 (default is 120, which is equivalent to 2 minutes).  

    These key values could be adjusted to a value between 300 decimal to 600 decimal to increase the respective timeout to 5 or to 10 minutes.

  4. Kathi Kathireshan says:

    The Web Service plug-in failed in OrganizationId: d85dac9f-7328-e411-80d7-00155d0a5b12; SdkMessageProcessingStepId: 681f0f11-8e01-40a1-8d84-424242bb392c; EntityName: none; Stage: 30; MessageName: ExportSolution; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

      at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

      at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

      at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

      at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)

      at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)

      at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)

      at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)

    Inner Exception: System.NullReferenceException: Object reference not set to an instance of an object.

      at Microsoft.Crm.Tools.ImportExportPublish.SecurityRoleHandler.GenerateNodes(BusinessEntityCollection rolePrivileges, XmlDocument XDoc, RoleService r, XmlElement roleNode, Role role)

      at Microsoft.Crm.Tools.ImportExportPublish.SecurityRoleHandler.ExportItem(XmlDocument XDoc)

      at Microsoft.Crm.Tools.ImportExportPublish.ExportHandler.Export(XmlDocument XDoc)

      at Microsoft.Crm.Tools.ImportExportPublish.RootExportHandler.RunExport()

      at Microsoft.Crm.WebServices.ExportXmlService.ExportSolutionWithTargetVersion(String solutionName, Boolean managed, String targetVersion, Boolean exportAutoNumberingSettings, Boolean exportCalendarSettings, Boolean exportCustomizationSettings, Boolean exportEmailTrackingSettings, Boolean exportGeneralSettings, Boolean exportMarketingSettings, Boolean exportOutlookSynchronizationSettings, Boolean exportRelationshipRoles, Boolean exportIsvConfig, ExecutionContext context)

    I getting this error while exporting this Solution.Please help me to resolve it……..

  5. legends says:

    I guess the CRM timeout settings changed in 2015 ?

  6. Bipin says:

    I am facing below issue while calling _service.update(entityObj);

    Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. —> System.ServiceModel.FaultException: The security context token is expired or is not valid. The message was not processed. — End of inner exception stack trace —


    private static void RefreshService()
    string orgServiceUrl = Default.CRMServiceUrl;
    Uri organizationUri = new Uri(orgServiceUrl);
    Uri homeRealmUri = null;
    ClientCredentials credentials = new ClientCredentials();
    credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;

    OrganizationServiceProxy orgProxy = new OrganizationServiceProxy(organizationUri, homeRealmUri, credentials, null);
    orgProxy.Timeout = new TimeSpan(1, 0, 0);
    _service = (IOrganizationService)orgProxy;
    catch (Exception)

Skip to main content