Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

Posted on by 80
We are seeing the error below in Microsoft Dynamics 365 v9.1 OnPremise, this happens since we upgraded to V9.1, we've never seen this issue before (full stack trace below)

This happens intermittently and we can't pin down what action causes it. When this happens, the dynamics API fails with the error for about 5 minutes before it recovers itself.

Is anyone experiencing the same issue?

[2022-02-15 08:25:16.613] Process: w3wp |Organization:402bf48d-1f8e-eb11-9124-005056010f8a |Thread:   23 |Category: Platform |User: e8012d0a-c65a-e911-a2d1-0cc47a688a65 |Level: Error |ReqId: c3cede64-cbf2-4eda-8338-d4ffe7239951 |ActivityId: a6ee5d32-080e-481f-be64-3f3b0ed53d99 | MessageProcessor.Execute  ilOffset = 0x47A
>MessageProcessor fail to process message 'RetrieveMultiple' for 'contact'. Error:
>Microsoft.Crm.CrmException: Maximum processes allocated for plug-in business logic exceeded. Fatal errors in plug-ins for this environment have occurred 20 times in the last 5 minutes. Each error requires an additional process to recover. Processes for plug-ins are being recycled. All plug-ins for this environment will fail during this period. More information: https://go.microsoft.com/fwlink/?linkid=2038718 
>   at Microsoft.Crm.Sandbox.SandboxCodeUnit.ProcessException(Exception originalException, IExecutionContext context, SandboxClient client, SandboxCallTracker callTracker, Boolean isSafeToRetry, DateTime performanceExecutionStartTime, SandboxTracker tracker, Guid parentExecutionId, CrmException& crmException, String& assemblyContents)
>   at Microsoft.Crm.Sandbox.SandboxCodeUnit.<>c__DisplayClass26_0.b__0()
>   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
>   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
>   at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePlugin.CDSExecute(IServiceProvider serviceProvider)
>   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
>   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
>   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
>   at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass3_0.b__0()
>   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
>   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
>   at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
>   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
>   at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context) Exception: Microsoft.Crm.CrmException: Maximum processes allocated for plug-in business logic exceeded. Fatal errors in plug-ins for this environment have occurred 20 times in the last 5 minutes. Each error requires an additional process to recover. Processes for plug-ins are being recycled. All plug-ins for this environment will fail during this period. More information: https://go.microsoft.com/fwlink/?linkid=2038718 
>   at Microsoft.Crm.Sandbox.SandboxCodeUnit.ProcessException(Exception originalException, IExecutionContext context, SandboxClient client, SandboxCallTracker callTracker, Boolean isSafeToRetry, DateTime performanceExecutionStartTime, SandboxTracker tracker, Guid parentExecutionId, CrmException& crmException, String& assemblyContents)  0x0
>   at Microsoft.Crm.Sandbox.SandboxCodeUnit.<>c__DisplayClass26_0.b__0()  0x25e
>   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)  0x90
>   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)  0x13
>   at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePlugin.CDSExecute(IServiceProvider serviceProvider)  0x223
>   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)  0x399
>   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  0x1ff
>   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  0x83
>   at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass3_0.b__0()  0x16f
>   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)  0x90
>   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)  0x13
>   at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)  0x106
>   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  0x83
>   at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)  0x47a
  • AdamKachinske Profile Picture
    AdamKachinske 5 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    I also started having this issue in 9.1.  It appears randomly while navigating around the web client.  I did notice from the system jobs that the rollup fields were being calculated at the time.

  • EzraM Profile Picture
    EzraM 5 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Hi,

    did your fixed the issue  ?

  • juancho Profile Picture
    juancho 80 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Hi, did you get any answer from Microsoft?

  • CRM-Dev Profile Picture
    CRM-Dev 135 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Yes in both cases. I opened a ticket with Microsoft just now. I will keep you posted on the results.  

  • juancho Profile Picture
    juancho 80 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Great to find someone else has the same issue! Unfortunately we haven't found a solution for this yet but I'll let you know if we do.

    Did you start getting the issue with Dynamics 365 v9.1? Is it intermittent as in our case?

  • CRM-Dev Profile Picture
    CRM-Dev 135 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Hi Juan,

    We are experiencing a similar issue for organization. I was wondering if you were able to resolve your issue. Or understand what is the root cause.

    Thanks.  

  • juancho Profile Picture
    juancho 80 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Thanks.

    I understand that Infinite loop or multiple errors in a plugin must be the issue but we are having trouble finding what is the code that causes this issue because we don't get any error that points at our code, the whole stack trace points at the Sandbox code + any other code before this error doesn't have any specific to the plugin code.

    Also, I've dealt with infinite loops before and they normally display within the context of a transaction and you get immediately the error. In this case it's more out of the blue and the API continuously returns the error for about 5 minutes, I've never seen an issue like that in Dynamics 365, not before upgrading to 9.1

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Hi,

    This is happening due to infinite loop.

    When I copy the URL from your error log go.microsoft.com/.../

    it is navigated to below page -

    docs.microsoft.com/.../best-practices-workflow-processes

    Make sure you have selected required field in Filtering attributes of your plugin steps. Also, verify your code to see if you are updating all fields instead of updating required fields from your plugin code.

    Make sure you check depth property in your plugin -

    crmbusiness.wordpress.com/.../

    blog.magnetismsolutions.com/.../crm-2011-plugins-avoiding-infinite-loops

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • necsa Profile Picture
    necsa 3,455 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Hi,

    I didn't have the same error I just thought maybe step or Image mistake by plugin registration. If you share your code maybe another experienced person can help you. How many records are you retrieving? Do you have pagination in the plugin to retrieve multiple contacts?

    Sorry, It was just guessing my previous answer.

  • JuanS Profile Picture
    JuanS 5 on at
    RE: Error "Maximum processes allocated for plug-in business logic exceeded" in Microsoft Dynamics 365 v9.1 OnPremise

    Thanks for replying.

    What would you look at in the plug-in registration? the system works fine most of the time but there are certain occasions where we get the error for 5 minutes or so. 

    We can’t  really establish what triggers the issue, there is nothing in the logs that appears to be related. It does says that there has been 20 fatal error in the 5 minutes but not sure how we can determine what error that is.

    Any more details on how to check this? Have you had the issue before?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans