Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Status 429 and rate limiting due to "too many 504 error responses"?

Status 429 and rate limiting due to "too many 504 error responses"?

I'm writing a simple application that calls the /v1/recommendations endpoint and a few others. The app is in very early development mode--I'm the only "user" while I'm developing and testing.

 

Now it seems my app is rate-limited for the /v1/recommendations and /v1/recommendations/available-genre-seeds endpoints, even though it worked yesterday. When I call them (using the spotipy wrapper), I either get read timeouts or this exception is raised:


"""
spotipy.exceptions.SpotifyException: http status: 429, code:-1 - /v1/recommendations?limit=100&seed_artists=... (etc)
Max Retries, reason: too many 504 error responses
"""

 

So, two questions:

1) I'm a little confused about the primary cause of the 504 status. Did I call the endpoint too many times? Or would the 504 be a gateway error unrelated to my code? Or something else?
2) If my app is rate-limited, how long would I have to wait before making another call to /v1/recommendations endpoints to ensure that read timeouts, 429, and 504 are not received?

Reply
7 Replies

Remark: You only have to make a request to available-genre-seeds once every month or less, and save them to a file. I don't think they change faster.

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Good point! I don't call it frequently, but I was wondering if rate-limiting to one endpoint like /recommendations would extend to any sub-endpoints, like /recommendations/available-genre-seeds.

I have this exact same error, with the same recommendations function too. My code was working fine and randomly started giving this error. Have you figured it out?

Same here.
any idea why?
everything is working just fine. only this recommendations API is getting 429 error.

 

why is that?

thanks

Is anyone able to fix this? I'm not even getting a response, although I'm using the Spotify python wrapper and I'm not even getting a response it just endlessly wait for the response...

@josegouvea1999 can you post your code here? Maybe there's a problem I can help fixing.

Edit: I just saw you already have made a post, snd only this issue occurs with this endpoint, and that can't be a coding bug. 

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

I’m also having issues with the recommendations request and limiting errors.  All other calls work.

Suggested posts