Skip to main content

Notifications

Customer Service forum

Getting error: Number of concurrent requests exceeded the limit of 52

Posted on by 90

I am trying to insert multiple accounts from javascript in dynamics crm 365 but getting this error below:

Possibly unhandled rejection: {"data":{"error":{"code":"0x80072326","message":"Number of concurrent requests exceeded the limit of 52.","innererror":{"message":"Number of concurrent requests exceeded the limit of 52.","type":"Microsoft.Crm.Extensibility.Throttling.ThrottlingConcurrencyExceededException`1[[Microsoft.Crm.Extensibility.ODataV4.Throttling.ThrottleKey, Microsoft.Crm.Extensibility, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]","stacktrace":"   at Microsoft.Crm.Extensibility.ODataV4.Throttling.ODataThrottlingHandler.<ThrottleRequestAsync>d__8.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Crm.Extensibility.ODataV4.Throttling.ODataThrottlingHandler.<>c__DisplayClass7_0.<<SendAsync>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.<ExecuteAsync>d__11`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.<ExecuteAsync>d__6`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Crm.Extensibility.ODataV4.Throttling.ODataThrottlingHandler.<SendAsync>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()"}}},"status":429,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"/api/data/v8.2/accounts","data":{"name":"Gnowangerup Public Library","address1_latitude":"-33.93667","address1_longitude":"118.00688"},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json;charset=utf-8"}},"statusText":""}
(anonymous) @ angular.min.js:123
(anonymous) @ angular.min.js:95
g @ angular.min.js:134
$digest @ angular.min.js:145
$apply @ angular.min.js:149
l @ angular.min.js:102
A.onload @ angular.min.js:107
load (async)
(anonymous) @ angular.min.js:107
p @ angular.min.js:103
(anonymous) @ angular.min.js:101
(anonymous) @ angular.min.js:134
$digest @ angular.min.js:145
$apply @ angular.min.js:149
(anonymous) @ angular.min.js:284
dispatch @ jquery-3.2.1.min.js:3
q.handle @ jquery-3.2.1.min.js:3

I also have tried to implement this solution without any luck:

community.dynamics.com/.../one-way-to-overcome-429-error-concurrent-requests-limit-exceeded-error-in-dynamics-365-crm-web-api

  • wperkinson3 Profile Picture
    wperkinson3 728 on at
    RE: Getting error: Number of concurrent requests exceeded the limit of 52

    Did you develop the code necessary to resolve this?  I am having the same issue using a javascript.

  • S. Hossain Profile Picture
    S. Hossain 90 on at
    RE: Getting error: Number of concurrent requests exceeded the limit of 52

    Could you please suggest some sample code for your point 1, how can I accomplish the scenario?

  • LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Getting error: Number of concurrent requests exceeded the limit of 52

    Hi partner,

    D365 has the limitation of request number for 52.

    So I suggest that you could reduce your requests or change some of these from asyn to syn.

    BTW, you could also check your code if there are to much useless requests with your insert function.

    Hope it helps.

    Best Regards,

    Leo

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Getting error: Number of concurrent requests exceeded the limit of 52

    You'll need to implement a mechanism to keep the number of concurrent requests below the limit. You've hit a different limit from that in the link you posted, so you'll need a different mechanism. There are 2 main approaches you could take:

    1. Keep a count of the number of requests, incrementing a counter each time you submit a request, and decrementing it when you get a response, and check if the counter has reached the limit before submitting a request (and using a wait if the limit is reached). For this to be robust you'd need a thread-safe counter
    2. Catch the 429 error, and if you get it, wait, then resubmit. However, if you have a very large number of requests to send, you may get a performance bottleneck

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,818 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,147 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans