Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle 504 overpass error code like 429 #565

Closed
wants to merge 1 commit into from

Conversation

matkoniecz
Copy link
Member

In my experience (see for example tilezen/vector-datasource#1336) 504 error code also may happen, though it is quite rare and may be handled like 429.

Unfortunately this code is not tested as it is not possible to easily reproduce this situation.

@westnordost
Copy link
Member

Hm, I find it dangerous to simply retry and retry when the server is clearly saying "ahrgh, stooop!"

@matkoniecz
Copy link
Member Author

matkoniecz commented Aug 28, 2017

Hm, I find it dangerous to simply retry and retry when the server is clearly saying "ahrgh, stooop!"

From my understanding of code 429 is currently handled in SC by waiting till slots for overpass queries are available.

AFAIK checking till /status call reports free slots should be correct handling also for 504.

I never noticed 504 errors reported multiple times in row, but maybe I am wrong and 504 should be handled differently.

@westnordost
Copy link
Member

westnordost commented Aug 30, 2017

429 is a client-error. The client overstepped his quota. The client will then patiently wait for the duration shown in /status until the next slot is free.

504 has nothing to do with slots. The server can very well show that slots are free, but still return a 504. This is independent of what the experience in dealing with an overpass server shows (i.e. "will not report this several times in a row"), the server's reply should be respected and the download process be cancelled.

As the documentation indicates, a new download process can always be started later.

@matkoniecz matkoniecz deleted the 504 branch March 7, 2018 13:43
NyanSten pushed a commit to NyanSten/StreetComplete that referenced this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants