none
How can i resolve this WCF timeout error in my environment RRS feed

  • Question

  • I have a wcf services in my environment that handles notification of job status to crm and SharePoint. i.e when a user submits a file, the file is processed on data processing system and once the process is done, the notification service will notify SharePoint and crm that the job has finished. And an update will be written to SharePoint  for the user to know and a copy of the details will be on crm for record purposes.

    The problem I'm having now is that the job status that the notification service handles stopped working and after checking the event log, what I saw is below Any idea of what's happening and how I can solve this problem
    error 1

    Timestamp: 30/12/2016 09:51:03 Message: Tier: WCFServices, Impact:  UnexpectedBehaviour, Ex: The operation has timed out, Stack: at  System.Net.HttpWebRequest.GetResponse() at  IMS.Services.DCFT.Notifications.Provider.NotificationProviders.Helpers.XmlParser.GetNotificationSetting(String  endpoint, Int64 notificationId, Int32 secondsToCache) at  IMS.Services.DCFT.Notifications.Provider.NotificationProviders.EmailNotificationProvider.SendNotification(String  type, String target, Int64 messageID, String[] tokenValues),  Additional: An error occurred in  EmailNotificationProvider.SendNotification. Category: General  Priority: -1 EventId: 0 Severity: Error Title:The operation has timed  out Machine: xxxxx-xxx App Domain:  /LM/W3SVC/2/ROOT/NotificationService-6-131275638867257685 ProcessId:  8652 Process Name: c:\windows\system32\inetsrv\w3wp.exe Thread Name:  Win32 ThreadId:8708 Extended Properties:

    error 2

    Timestamp: 30/12/2016 09:50:23 Message: Tier: WCFServices, Impact:  UnexpectedBehaviour, Ex: The request channel timed out while waiting  for a reply after 00:01:00. Increase the timeout value passed to the  call to Request or increase the SendTimeout value on the Binding. The  time allotted to this operation may have been a portion of a longer  timeout., Stack: Server stack trace: at  System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime  operation, ProxyRpc& rpc) at  System.ServiceModel.Channels.ServiceChannel.Call(String action,  Boolean oneway, ProxyOperationRuntime operation, Object[] ins,  Object[] outs, TimeSpan timeout) at  System.ServiceModel.Channels.ServiceChannel.Call(String action,  Boolean oneway, ProxyOperationRuntime operation, Object[] ins,  Object[] outs) at  System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage  methodCall, ProxyOperationRuntime operation) at  System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage  message) Exception rethrown at [0]: at  System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage  reqMsg, IMessage retMsg) at  System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&  msgData, Int32 type) at  Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity) at  Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity  entity) at  Microsoft.Xrm.Client.Services.OrganizationService.InnerOrganizationService.UsingService[TResult](Func`2  action) at  IMS.CRM2011.DCFT.Connectivity.CRMClient.CreateEntityRecord(Entity  entity) at  IMS.Services.DCFT.ProcessingNotifications.DPS.ProcessingNotificationService.NotifyProgress(String  callingSystem, ProcessingNotification processingNotification),  Additional: An error occurred in  ProcessingNotificationService.NotifyProgress, callingSystem DPS,  correlation ID 00000000-0000-0000-0000-000000000000 Category: General  Priority: -1 EventId: 0 Severity: Error Title:The request channel  timed out while waiting for a reply after 00:01:00. Increase the  timeout value passed to the call to Request or increase the  SendTimeout value on the Binding. The time allotted to this operation  may have been a portion of a longer timeout. Machine: xxxxxxx App  Domain:  /LM/W3SVC/2/ROOT/ProcessingNotificationService-3-131275635179502776  ProcessId: 8652 Process Name: c:\windows\system32\inetsrv\w3wp.exe  Thread Name: Win32 ThreadId:8392 Extended Properties:

    Tuesday, January 3, 2017 10:50 AM

Answers

  • Hi seyiari83,

    I agree with DA924x that increasing timeout. I suggest you increase Timeout both in client and server side in binding.

    Here is a simple code.

    <configuration>
      <system.serviceModel>
        <bindings>
          <wsHttpBinding>
            <binding openTimeout="00:10:00" 
                     closeTimeout="00:10:00" 
                     sendTimeout="00:10:00" 
                     receiveTimeout="00:10:00">
            </binding>
          </wsHttpBinding>
        </bindings>
      </system.serviceModel>

    You could refer the link below for more information.

    #Configuring Timeout Values on a Binding
    https://msdn.microsoft.com/en-us/library/hh924831(v=vs.110).aspx

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by seyiari83 Wednesday, January 4, 2017 3:45 PM
    Wednesday, January 4, 2017 1:46 AM

All replies

  • So why can't you increase the timeout value on the client-side so that WCF doesn't timeout after one minute of time passed closing the connection? It's a value that you can control the amount of time WCF keeps a connection open before it times-out.
    Tuesday, January 3, 2017 10:11 PM
  • Hi seyiari83,

    I agree with DA924x that increasing timeout. I suggest you increase Timeout both in client and server side in binding.

    Here is a simple code.

    <configuration>
      <system.serviceModel>
        <bindings>
          <wsHttpBinding>
            <binding openTimeout="00:10:00" 
                     closeTimeout="00:10:00" 
                     sendTimeout="00:10:00" 
                     receiveTimeout="00:10:00">
            </binding>
          </wsHttpBinding>
        </bindings>
      </system.serviceModel>

    You could refer the link below for more information.

    #Configuring Timeout Values on a Binding
    https://msdn.microsoft.com/en-us/library/hh924831(v=vs.110).aspx

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by seyiari83 Wednesday, January 4, 2017 3:45 PM
    Wednesday, January 4, 2017 1:46 AM