Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

Does plugin get its own 2 min timeout?

Posted on by

Hello I have a question I'm hoping someone can answer as i cant seem to find a definitive answer anywhere.

I have a plugin that is often hitting the 2 min timeout, there is a large amount of processing that is included in this plugin that can be handled asynchronously and is not required for the synchronous section of the plugin.

if I create a new global action that accepts parameters, and pass data to this that then calls a newly created asynchronous plugin will this plugin have its own 2 minute limit? 
if not is there a way to do create this as a new session?

  • Suggested answer
    RE: Does plugin get its own 2 min timeout?

    Hi,

    Below article are best practices for 2minutes plugin timeout for external calls-

    1. Set KeepAlive to false when interacting with external hosts in a plug-in 

    2. Set Timeout when making external calls in a plug-in 

    3. Dispose HttpWebResponse objects immediately after use. More info 

      using (result = webRequestClient.GetResponse())
        {
            // do functionality;
        }
      
    4. Full list of Best practices and guidance for the Microsoft Dataverse 

    Hope this helps!

    Regards,

    Venkatesh N

  • RyanCRM Profile Picture
    RyanCRM on at
    RE: Does plugin get its own 2 min timeout?

    No I just needed to understand how the plugin limit worked, I have taken over an existing solution that doesn't seem to have been built with any limits in mind, the is a dependency on an external webservice call that is occasionally taking over 50s - 65s (typically 10 - 20s) to respond this is then using a large amount of the limit.

    The rest of the plugin which does all the processing (5 - 6 different entity types) then runs in a linier fashion when it does need to, so i was going to split this up into separate plugins and process asynchronously as they are not dependant. individually id be very suppressed if any of these processes would take more the 15 - 20s to process.

    This method would require very little rework of immediately fix the existing problem, which will then allow me to then re architype the solution using azure or a similar service.

  • Guido Preite Profile Picture
    Guido Preite 54,057 Super User on at
    RE: Does plugin get its own 2 min timeout?

    the plugin will have its own 2 minutes, so your logic is to put some code inside the action and some code inside the plugin? if the process doesn't complete in 4 minutes your next step will be to call an action that call another action that call the plugin and hope it doesn't need 6 minutes?

  • RyanCRM Profile Picture
    RyanCRM on at
    RE: Does plugin get its own 2 min timeout?

    so if i call an action that calls a new plugin that plugin doesn't get its own 2min ?

  • Verified answer
    Guido Preite Profile Picture
    Guido Preite 54,057 Super User on at
    RE: Does plugin get its own 2 min timeout?

    asynchronous or synchronous doesn't make difference for the 2 minutes timeout.

    if your logic takes longer than 2 minutes then move it to azure or a similar service.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,459 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,783 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans