Intermittent HTTP 503 response - "Your API quota or rate limit has been exceeded."


#1

Hi,

I am currently implementing the GTFS-R Vehicle Position data-feed for a new application. At a high-level, the application is making a HEAD and a GET request once every 30 seconds to endpoint https://api.transport.nsw.gov.au/v1/gtfs/vehiclepos/buses.

I am experiencing intermittent Service Unavailable responses from this endpoint (e.g. “TransactionId”: “0000015daad65f5a-3bd10d”, “ErrorDateTime”: “2017-08-08T16:30:34.746-07:00”). The ErrorDetails/Message component of the response indicates that my API quota or rate limit has been exceeded, however according to my account, I am on the bronze tier, and have not gone over the 60 000 daily request limit. This leads me to believe that I am triggering the > 5 requests/second limit, which does not appear to be the case.

Is there something that I am missing in regards to these errors? Subsequent requests process as normal, so the error appears to clear itself to allow successful responses after the error.

Any assistance or advice would be appreciated.

Regards,
Adam


#2

Hi Adam,
I’ve trawled through our logs, it doesn’t appear you’re anything wrong so we’ve raised the issue with our vendor and we’ll come back to you.


#3

Excellent, Thanks Patrick.


#4

Hi @adam.schofield, our vendor found that the issue was due to some configuration on our API gateway. We’re changing it to prevent this from happening again in the future. Nothing wrong with your app or requests.

Please let us know if you encounter any further issues.

Thanks,
Alex


#5

Hi,

I’m having the exact same problem. Same API endpoint, not even close to hitting the quota on my bronze account.

I’m sending a HEAD request once every 10 seconds, and a GET request 500ms later if the Last-Modified header has changed. Nevertheless I see something like:

{ "ErrorDetails":{ "TransactionId":"00000162cbc84aab-c7c8", "ErrorDateTime":"2018-04-15T18:02:12.028-07:00", "Message":"Your API quota or rate limit has been exceeded. If you think you need a increased quota or rate limit, please email OpenDataHelp@transport.nsw.gov.au to request an upgrade.", "RequestedUrl":"/v1/gtfs/vehiclepos/buses", "RequestMethod":"GET" }}

Quite often.

FYI my IP address is 202.9.228.50.

How can I proceed here?

Regards,
-Cameron Duff


#6

Hi @cameron.duff, I’ll have a look at it. You’re definitely not hitting the daily quota so it looks like an issue with the rate limit. Can you confirm that you’re definitely not calling the API more than 5 times a second with your app? If you need to call the API that many times we recommend you stagger your calls by 1 second.

Thanks,
Alex


#7

Hi Alex,

I’m not calling it more than twice in a second at any point, with 500ms between each request minimum.

Regards,
-Cameron Duff


#8

Hi Again,

The behaviour suddenly stopped around 4:28. I haven’t changed anything so I’m reluctant to say the issue is resolved, just letting you know.

Regards,
-Cameron Duff


#9

Hi @cameron.duff, yes apologies about that. It turned out to be a configuration issue on our end that has now been fixed.

Keep an eye on it and let us know if you encounter any further problems.

Thanks,
Alex


#10

Thanks Alex,

Will do.

Regards,
-Cameron Duff