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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

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

(0) ShareShare
ReportReport
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
I have the same question (0)
  • necsa Profile Picture
    3,455 on at

    Hi,

    Firstly check your Plugin registration. Is it correct?

    If you use Step and Image please check them also.

  • JuanS Profile Picture
    5 on at

    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?

  • necsa Profile Picture
    3,455 on at

    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.

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    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/

  • juancho Profile Picture
    80 on at

    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

  • CRM-Dev Profile Picture
    135 on at

    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
    80 on at

    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
    135 on at

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

  • juancho Profile Picture
    80 on at

    Hi, did you get any answer from Microsoft?

  • EzraM Profile Picture
    5 on at

    Hi,

    did your fixed the issue  ?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 37

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans