Andrew
Andrew

Reputation: 389

Parse error code: 155 - Exceeded request limit

I am under the free plan that has 30 requests / second limit. My question is what happens if there are more than 30 in one second? Does the requests over the 30 get pushed to the next second? If this is the case, is there a way to prioritize the delayed requests to make sure they go through the next second?

If they do not get pushed over to the next second of requests, how would I overcome this without upgrading my account? I was thinking that if I received an error 155 code I can just recall the method used to retrieve the data, and keep doing that until it was successful.

Upvotes: 0

Views: 833

Answers (1)

Akaino
Akaino

Reputation: 1025

TL:DR

They will be dropped.

Long answer: From the parse FAQ:

What happens if my app exceeds the requests/second limit?

Once your app exceeds the request limit, any further requests will be dropped until the average number of requests sent over a trailing 60 second window drops under the request limit for this app. Please refer to the preceeding question for more information on how this limit is calculated. When a request is dropped due to exceeding the request limit, the API will respond with a 155 error code (Request Limit Exceeded). To prevent the requests from failing you should adjust the request limit slider for the relevant app on the Account Overview page. Please note that you can see your actual requests/second on the Performance Analytics tab.

Source: Parse FAQ

So what can you do once you reached your (free) limit without upgrading the plan? Well, first of all go and watch your analytics graph on your parse dashbord. Observe it carefully and think about whether or not you need that many requests. Once you've done that go for performance-optimization. Check the parse documentation for how to do that (for your specific platform) here:

Parse documentation

As an example the performance guide for the IOS master race:

Performance Guide for iOS

If you checked everything and your are sure there is no mor optimization to your code (like caching data, limiting requests to 1/minute etc...) you most likely have to upgrade your plan.

However, what could you do to catch your request error?

As you stated yourself you can keep trying to request the information until you got a positive request. The problem is that all those tries are adding up to your req/m counter, thus your limited stays exceeded.

Best option: Don't reach the limit.

Resolving option: Try another request. Maybe a third. Then stop and wait for a minute or so but give some information like Server currently not available. Please try again later. And then, again, check your code optimization.

Bad option: Keep trying to request until you got it.

Upvotes: 4

Related Questions