2

For the past two days, I have been facing this issue.

503: Instagram is rate limiting your requests

There are generally two types of query that causes this error. Though there is no discern-able consistency I can find.

GET https://api.instagram.com/v1/users/self/media/recent.json?access_token=<user token>: 503: Instagram is rate limiting your requests.

GET https://api.instagram.com/v1/users/self.json?access_token=<user token>: 503: Instagram is rate limiting your requests.

I have searched the documentation (https://www.instagram.com/developer/) but I was unable to find any references to 503 errors.

The other links I have been looking at is the following.

Instagrm Rate limit issue

https://imranakbar.wordpress.com/2012/09/13/rate-limit-exceeded-instagram-error/

As I am using the instagram-ruby gem, it seems like the service is unavailable?

raise Instagram::ServiceUnavailable, error_message_500(response, "Instagram is rate limiting your requests.")

Refer to this link for more information on instagram-ruby gem https://github.com/facebookarchive/instagram-ruby-gem/blob/master/lib/faraday/raise_http_exception.rb

I would like to know

(1) if the service unavailable is due to me unknowingly hitting the rate limits and got throttled

or

(2) Instagram is doing some stuff to their servers, causing this error

NOTE: I have sent a report to Instagram on this issue.

Community
  • 1
  • 1
chickensmitten
  • 477
  • 6
  • 16
  • Or you have no more requests left: https://www.instagram.com/developer/limits/ – siegy22 Aug 29 '16 at 10:00
  • I have read that documentation. According to it, the error code should be 429 not 503. Additionally, I only have less than 300 access tokens. Each should only query 3 times (2 for recent user media and 1 for user profile details) within an hours window. I dont think, it will hit the rate limit right? – chickensmitten Aug 29 '16 at 10:07

2 Answers2

3

HTTP 503 response stands for Service Unavailable. The error message is misleading as it suggest that you are hitting your rate limit. From Instagram's documentation, you can read that hitting rate limit will result in HTTP 429. I believe that in your case it is some kind of overload or maintenance.

You should contact Instagram's support directly.

Maciej Małecki
  • 2,725
  • 19
  • 29
  • So, after a week, there is still no reply from instagram. But I found a way to compensate. Will write it down in another Answer – chickensmitten Sep 08 '16 at 01:39
0

To compensate for this problem, I have added code to rescue from the 503 error and retry again later on. To avoid retrying indefinitely, the code will also keep tabs of the number of retries and will show an error after a number of retries.

chickensmitten
  • 477
  • 6
  • 16