OpenAPI 1.2

FREEMIUM
By TransLoc | Updated 8 days ago | Location
Popularity

9.9 / 10

Latency

107ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Method Not Allowed

Rapid account: Jhope
jhope
10 years ago

I switched over to using the new URLs for retrieving route, stop, and arrival estimates. I am able to successfully retrieve all of this data. However, occasionally (at seemingly random times once every couple minutes) an arrival estimate request fails. The TransLoc server responds with a 405 error “Method Not Allowed”. Since the expiry time for this data is typically 5 seconds, my application requests the arrival estimate data once every 5 seconds. The vast majority of the requests are successful, but occasionally the 405 error returns. All requests use the same URL: https://transloc-api-1-2.p.mashape.com/arrival-estimates.json?agencies=255&format=json (with the authorization header provided from mashape).

Why does this request fail on occasion?

Rapid account: Transloc
transloc Commented 10 years ago

Hi jhope,

The 405s are caused by rate-limiting. The current rate-limiting is implemented to limit the rate of data access per IP address. So I suggest that you change the rate of querying arrival estimates to every 6 seconds, and it should eliminate the 405s.

If this didn’t solve the problem, it is probably caused by multiple clients sharing the same IP address (e.g. 2 mobile device using the same WiFi). If this is an outstanding issue for many of the API users, we will consider change how rate-limiting works or maybe disable it.

Thanks.

Rapid account: Transloc
transloc Commented 10 years ago

Please check that when you are receiving a 405, you also get this string in the response body: “You have exceeded your rate limit. Try again in 0 second(s).” Otherwise, please let us know that we can find out what the problem is.

Rapid account: Jhope
jhope Commented 10 years ago

I had scaled back the polling to 6 seconds. I also have confirmed that the 405 errors are no longer reporting. Thanks.

Rapid account: Transloc
transloc Commented 10 years ago

After some more checking, we found that there was an issue with rate-limiting implementation and client IP address checking. The issue was fixed now and you should be able to make queries without 405 if you stay with reasonable rate and the above issue does not raise.

Join in the discussion - add comment below:

Login / Signup to post new comments