[OSM-dev] Handling 500 errors
Dave Hansen
dave at sr71.net
Fri Aug 31 00:30:25 BST 2007
The TIGER upload gets a 500 error back from the server about every 1,000
uploads. I want to be sure to be nice to the server, so what's an
appropriate action to take when we start to get these?
Right now, I sleep for 2 seconds, and double the sleep for every
consecutive error, up to 7 times when I just stop the upload (this
hasn't happened just yet).
What do these errors actually _mean_? Is the server just overloaded?
Can we teach the server to handle these a bit more gracefully so the
clients don't have to?
Can the server detect when it is getting into these conditions, and
perhaps return 503 errors?
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
> 10.5.4 503 Service Unavailable
> The server is currently unable to handle the request due to a
> temporary overloading or maintenance of the server. The implication is
> that this is a temporary condition which will be alleviated after some
> delay. If known, the length of the delay MAY be indicated in a
> Retry-After header. If no Retry-After is given, the client SHOULD
> handle the response as it would for a 500 response.
We could easily design the OSM clients to obey the Retry-After headers
to back off properly.
-- Dave
More information about the dev
mailing list