NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

fica
11113
accept rate: 0%

edited 16 Aug '19, 18:38

1

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.

(16 Aug '19, 18:16) tijmenheid

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.

(16 Aug '19, 18:41) fica
1

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

(18 Aug '19, 17:19) DaveF

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.

(19 Aug '19, 11:43) fica
1

The Default timeout value is 180. Setting it to 40 means the routine will quit earlier.

(19 Aug '19, 17:07) DaveF

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×147
×29
×16
×9
×4

question asked: 16 Aug '19, 16:53

question was seen: 1,408 times

last updated: 19 Aug '19, 17:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum