You have reached concurrent request limit

Backendless Version (3.x / 6.x, Online / Managed / Pro )

PLAN: [Cloud 9]

Client SDK (REST / Android / Objective-C / Swift / JS )

backendless_sdk: ^7.2.11
Flutter

Application ID

0A320D1F-05D1-4A76-FF0F-4905268F6100

Expected Behavior

  1. Our Flutter App sends requests like:

URL https://darlingproperty.backendless.app/api/data/employee/find

  1. and bevor Backendess had the eu server ‘issue’ everything went fine

Actual Behavior

  1. the same App is now getting this Error from Backendless SDK:

The App is not published to our Users and my Analytics also did not show many requests:

The Backendless console gave me this Info:
18:45:35.33 | SERVER_CODE | INFO | [34770] Building ServerCode Model for path (/opt/backendless/repo/0a320d1f-05d1-4a76-ff0f-4905268f6100/files/servercode/CODELESS/AssignRoleService/PRODUCTION)

18:45:35.35 | SERVER_CODE | INFO | [34770] ServerCode Model built in 6ms

18:45:35.35 | SERVER_CODE | INFO | [34770] Reading services/AssignRoleService/index.js…

18:45:35.37 | SERVER_CODE | INFO | [34770] ServerCode Model extended in 2ms

18:45:35.39 | SERVER_CODE | INFO | [34770] [D95D342D-A0BE-B139-FF89-9F341825ED00] [INVOKE SERVICE] services.AssignRoleService.LoadUserListRoles

18:45:35.334 | SERVER_CODE | ERROR | [34770] Error: You have reached concurrent request limit. Your limit is 100 at checkStatus (/usr/local/lib/node_modules/backendless-coderunner/node_modules/backendless-request/lib/request.js:330:9) at processTicksAndRejections (internal/process/task_queues.js:95:5)

18:45:35.335 | SERVER_CODE | INFO | [34770] Processing finished in 312.770ms

18:45:35.335 | SERVER_CODE | INFO | [34770] Task results sent

18:45:35.335 | SERVER_CODE | INFO | [34770] Flushing logs

According to the graphic I see in your app: between 13 and 14 of February your app received ~100 concurrent requests.
May be it was related to some tests, or something similar?

We did not have any aktive User on our System so I can’t explain this behavior. But even if this was the case, how long did the request limit shows up?

I was able to find the throwing function:

which we hit with >100 UserID’s in one call. Is there a way to limit the concurrency of the map function in Cloud Code Codeless?
I’m pretty sure that this code did not hit any rate limits in the past but since the EU Cluster is back again, we hit this problem.

@Stephan_Tomforde ,

You can force logic to execute requests for user roles sequentially using “for each” block instead of “map items in list”.
Your code will looks similar to this:

Regards, Andriy

1 Like

@Andriy_Konoz the workeround isn’t as fast and elegant as the map solution but works without hitting the Request Limit.

Thanks a lot Andriy