locked
Plugin executation stop after 3 minutes in On Demand RRS feed

  • Question

  • Hi All,

    I tried to run a plugin at CRM Online (OnDemand) and my plugin stops over 3 min passed. I need to check/update all of the records from records which is custom entity upon certain condition and those records will be 10,000 records or even more. So I created dummy data for child records and try to update all those records. It's take a bit long and stop after 3 minutes and show error that "The plug-in execution failed because the operation has timed-out at the Sandbox Client". Is there any time restriction for sandbox plugin in CRM Online? Can anyone suggest me how I can solve this issue. Thanks in advance.

    Monday, March 28, 2011 8:14 AM

Answers

  • There's mention in the following forum posting of a 2 min timeout for a process running in the sandbox; so, if your process is still running after 3 minutes, you're already over-achieving:

    http://social.microsoft.com/Forums/en/crm2011beta/thread/6cb2c8e5-edf2-4a82-ba54-170a0b63a27f

    There is mention in the CRM 2011 SDK of the need to keep processing time in plugins and workflow activities to a minimum:

    http://msdn.microsoft.com/en-us/library/gg509027.aspx#Security

    "For workflow assemblies, and plug-ins, avoid writing code that takes a long time to execute. It is particularly important that plug-in code that is registered to execute synchronously returns as quickly as possible."

    While your plugin may be asynchronous, that doesn't mean it can take an indefinite period of time to process, particularly in the CRM Online environment.

    For such long running process I think "Best Practise" would be to develop an external process such as a Windows Service that periodically interrogates and updates the CRM data as required.


    --pogo (pat)
    Monday, March 28, 2011 10:50 PM