web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

(0) ShareShare
ReportReport
Posted on by 25

Hello,

We have a workflow which checks a few conditions and then executes a custom workflow activity plugin. That plugin calls an external API to send out emails. The worklfow is failing with a timeout error. After further research we found out that it is timing out in our end . We added a timeout setting in our code and that did not help. How can we increase the timeout in the CRM server itself? Our organization is On-Prem, 8.2. The error log is the following:

Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out
  at System.Net.HttpWebRequest.GetResponse()
  at CustomWorkflowActivities.Common.GetEmailAddressID(String key, String secret, String email, IOrganizationService _service, EntityReference contactGuid)
  at CustomWorkflowActivities.Campaign.Execute(CodeActivityContext executionContext)
  at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
  at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

*This post is locked for comments

I have the same question (0)
  • gdas Profile Picture
    50,091 Moderator on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    Hello,

    How long time its taking? Is it exceeds 2 minutes ?

  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    Old discussion thread on similar topic: community.dynamics.com/.../165629

  • Ram 1222 Profile Picture
    25 on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    Hi Goutam,

    Workflow is running in background and the mode is none(not sandbox) and I gave a process timeout for 2 min. I'm not sure how long it is running. is there a way to check it and increase the time?

    Thanks

    Ram

  • Ram 1222 Profile Picture
    25 on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    Hi Arun,

    we are not updating huge number of records, as I mentioned it is just Http call [(HttpWebResponse)httpRequest.GetResponse()]. It is throwing that time out error. I added httprequest.timeout = 300000; in my code but the error is getting even before that. The network is not blocking anything and the API call was sent successfully but we didn't receive any response(even though it is actually getting a response told by third party that they are sending a response). I increased httpruntime execution time in server. Nothing helps till now.

    Note: its not failing for all of the sessions it is failing randomly.

    Thanks

    Ram

  • Ram 1222 Profile Picture
    25 on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    workflow has a process timeout of 2 minutes so the workflow initiated at 12:00 PM and postpone till 12:21 and at 2:24 I received timeout error. Hope this helps @Goutam Das

  • RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    Hi,

    I am pretty sure that the timeout is occurring from your external API. You need to find ways to increase timeout for your external API.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    Can you please share the code how you are calling with external API . Increase the timeout there and also check with integrated system where you may have slowness issue . It would be good that you put some trace log in your plugin and track the time in milliseconds .

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    Hi,

    Is there any attachments with email. Once we have faced this error : The operation has timed out. For that we have added api method first in plugin then method that created email.

    Thanks,

    Ridhima

  • Verified answer
    Ram 1222 Profile Picture
    25 on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    Hello Guys,

    Thanks for sharing possible solutions. The root cause for my error is that server is blocking the outgoing calls because there were more number of API calls happening at a particular time which excludes the number of api calls limit. We changed server configuration file to increase the limit. Initially it was 2, we changed it 100 and the issue was resolved.

    Thanks

    Ram

  • shabrany Profile Picture
    5 on at
    RE: Workflow suspended temporarily due to error: Unhandled Exception: System.Net.WebException: The operation has timed out

    @ram_1222

    Hello Guys,

    Thanks for sharing possible solutions. The root cause for my error is that server is blocking the outgoing calls because there were more number of API calls happening at a particular time which excludes the number of api calls limit. We changed server configuration file to increase the limit. Initially it was 2, we changed it 100 and the issue was resolved.

    Thanks

    Ram

    Where did you change the limit for the outgoing calls?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans