Hello, I have been trying to query OSM data using overpass-api.de but it's working pretty randomly. For example, It gets data twice in a row, but the third request timeouts, or works once then fails two or three times, etc. I haven't been able to determine any patterns in this. it just seems to fail at random times. I am getting Connection Timeout as a result of a failed request. Have in mind that It's the same code that sends the request. Same requests work and fail randomly. Is there anything I might be missing in here? Do You have any idea what could cause this? EDIT: Thanks for the suggestion! Query example: [bbox:-4.8829942,29.6411133,-4.8720477,29.6520996][timeout:40]; ( node["building"]; node[~"."~"^building$"]; way["building"]; way[~"."~"^building$"]; relation["building"]; relation[~".*"~"^building$"]; ); out meta;>;out meta; Thanks, Filip asked 16 Aug '19, 16:53 fica |
Hi Fica, could you please edit your question with the query in question? Then we can give feedback. In general, any request randomly can have to wait because of too much data to return or just because it's busy on the server.
Hi tijamenheid,
Thanks for the quick reply! I included a query example. Have in mind that this exact query, for example, works every second time or something like that.
Could you clarify what data is being returned "twice"?
To simplify use the 'nwr' option [bbox:-4.8829942,29.6411133,-4.8720477,29.6520996][timeout:40]; nwr[building]; (._;>;); out meta;
This returns 1949 polygons, the same as your routine.
This line - nwr[~".*"~"^building$"]; is looking for tags with the value of 'building' & in your example returns nothing
Hi DaveF,
I don't have much experience with the query language so this was how I queried parts of polygons that were partially out of the bounding box. I also wanted to query tags by value as well, just to be sure not to miss anything. Thank You for the suggestion.
Today queries seem to work fine, none resulted in a timeout. It was probably an overload on the server since I ran the same queries as I did before.
The Default timeout value is 180. Setting it to 40 means the routine will quit earlier.