drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
692 stars 90 forks source link

Overpass API Server blocked our IP #681

Closed rbsdc closed 1 year ago

rbsdc commented 1 year ago

@drolbr I am currently working on the Water Fountains project (https://github.com/water-fountains) and noticed that the main Overpass API server seems to block our IP (https://www.water-fountains.org, 185.166.99.100). Is this the case and if yes, what are the reasons? We use the npm query-overpass library (https://www.npmjs.com/package/query-overpass). If I switch to the alternative server https://lz4.overpass-api.de/api/interpreter it is working again.

mmd-osm commented 1 year ago

Side note: overpass-api.de points to points both z.overpass-api.de and lz4.overpass-api.de. So in fact lz4* is not an alternative server but one of the two productive instances.

rbsdc commented 1 year ago

Thank you for the info. The query-pass library I mentioned uses the instance at https://z.overpass-api.de/api/interpreter (178.63.11.215) by default. This is the one that is not working for us anymore.

mmd-osm commented 1 year ago

If you keep sending requests to the same server over some longer period of time, you would automatically be rate limited. Either switch to another server in that case, or take a pause before sending further requests. Also check the handling of the /api/status endpoint in OSMnx as an example on how to proceed here.

rbsdc commented 1 year ago

I saw the rate limits at https://wiki.openstreetmap.org/wiki/Overpass_API, but I assumed we never reached the rate limit of 10000 requests/5GB/day - however, I will double check first - thank you again!

mmd-osm commented 1 year ago

Yes, the information in the wiki is outdated and needs updating.

drolbr commented 1 year ago

According to the logs, there have been at least accesses to z.overpass-api.de since 2022-12-01. There are accesses to lz4.overpass-api.de, but most of them succeed. The details of the rate limiting.

drolbr commented 1 year ago

I strongly suggest to set a proper user agent and/or provide your project's URL as referrer.

matkoniecz commented 1 year ago

Yes, the information in the wiki is outdated and needs updating.

What would be the correct info?

10 000 and 1 GB as per https://dev.overpass-api.de/overpass-doc/en/preface/commons.html ?

related: https://github.com/drolbr/overpass-doc/pull/15