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

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

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.

Excellent, Thanks Patrick.

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

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

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

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

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

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

Thanks Alex,

Will do.

Regards,
-Cameron Duff

I am experiencing the same problem when connecting to the API through the backend, definitely didn’t hit the limit, anything I am missing? what details do you need from me?

API calls from the mobile app directly is working fine…

Hi @Mohamed , we are investigating it. Can you confirm that you are not calling more than 5 times per second?

Thanks @terencekhoo - Yes definitely one at a time, each time after I make a test call I check the number of daily hits and it gets incremented by one…

I am also checking if there are any missing configuration from my side as well.

Hi @Mohamed , can you advise the following?

  1. The exact time of the error
  2. The error message
  3. For your backend, are you going through any other service before reaching our API gateway?
  4. Is this still happening?

Thanks.

  1. I have generated a new one, see the time setamp below
  2. See below
  3. No, I am calling from my backend directly, backend server is hosted on aws.
  4. Yes
org.springframework.web.client.HttpServerErrorException$ServiceUnavailable: 503 Service Unavailable: [{     "ErrorDetails":{         "TransactionId":"0000017ca4d07764-18a7f0",        "ErrorDateTime":"2021-10-22T16:46:39.728+11: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/carpark/",        "RequestMethod":"GET"    }}]

Hi @terencekhoo - I have tested the API call from a .net backend and it worked fine, feel free to ignore this if it’s not happening with anyone else.

Hi @Mohamed ,

Thanks for letting us know that it works for you.