Overpass-API icon indicating copy to clipboard operation
Overpass-API copied to clipboard

"allow-duplicate-queries" seems to work partially

Open stalkerGH opened this issue 1 year ago • 8 comments

Hi wiktorn.

I'm fighting with Overpass API local installation from your Docker image. After long debugging I realized that the package I'm using in R falis (probably) because of duplicate queries in dispatcher. I stopped and removed Docker container, then pulled most current image using docker pull wiktorn/overpass-api:latest. I checked files in Docker Desktop and they seem to contain the fixes you have made from PR rom @lukey78.

Then I started docker by this command:

docker run \
      -e OVERPASS_META=no \
      -e OVERPASS_MODE=init \
      -e OVERPASS_PLANET_URL=http://download.geofabrik.de/europe/poland-latest.osm.bz2 \
      -e OVERPASS_DIFF_URL=http://download.openstreetmap.fr/replication/europe/poland/minute/ \
      -e OVERPASS_RULES_LOAD=10 \
      -e OVERPASS_UPDATE_SLEEP=3600 \
      -e OVERPASS_USE_AREAS=true\
      -e OVERPASS_ALLOW_DUPLICATE_QUERIES=yes \
      -v /home/stalker/.docker/overpassAPI-poland:/db \
     -p 8888:80 \
     -i -t \
     --name overpass_poland \
     wiktorn/overpass-api

But I see in log:

127.0.0.1 - - [19/Dec/2023:12:49:58 +0000] "GET /api/interpreter?data=[out:json];node(1);out; HTTP/1.1" 200 296 "-" "curl/7.74.0"

So is the shuffling working? If I understand what docker-healthcheck.sh does, every time node number should be different.

If I paste http://127.0.0.1:8888/api/interpreter?data=%5Bout:json%5D;node(1);out; to browser address bar and press ENTER, I got error message:

Error: runtime error: open64: 0 Success /osm3s_osm_base Dispatcher_Client::request_read_and_idx::duplicate_query

But if I change node(1) to random number, eg. node(9359), I got:

{ "version": 0.6, "generator": "Overpass API 0.7.61 980f0092", "osm3s": { "timestamp_osm_base": "2023-12-19T08:21:45Z", "copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL." }, "elements": [

] }

What I'm doing wrong then?

stalkerGH avatar Dec 19 '23 12:12 stalkerGH

+1

skinnynpale avatar Dec 20 '23 06:12 skinnynpale

@stalkerGH Strange - for me the problem stopped, but I have not yet switched to the new official image. Can you try with my fork on Dockerhub my pull request was based on?

jhassler/overpass-api:0.7.61.8

I can maybe look into that on the weekend.

lukey78 avatar Dec 20 '23 20:12 lukey78

@stalkerGH Strange - for me the problem stopped, but I have not yet switched to the new official image. Can you try with my fork on Dockerhub my pull request was based on?

jhassler/overpass-api:0.7.61.8

I can maybe look into that on the weekend.

works thx

skinnynpale avatar Dec 20 '23 20:12 skinnynpale

@stalkerGH Strange - for me the problem stopped, but I have not yet switched to the new official image. Can you try with my fork on Dockerhub my pull request was based on?

Hi. Thanks for reply. I'll try and give feedback.

stalkerGH avatar Dec 20 '23 20:12 stalkerGH

@lukey78 I'm puzzled. Should I add OVERPASS_HEALTHCHECK to Docker call...?

EDIT: I didn't understand how the docker-healtcheck.sh script works but everything is clear now. If I have the OVERPASS_ALLOW_DUPLICATE_QUERIES=yes option in the Docker call, then the script will query node(1) all the time. If I set OVERPASS_ALLOW_DUPLICATE_QUERIES=no, then the node number is randomized.

Thank you :)

stalkerGH avatar Dec 20 '23 21:12 stalkerGH

My problem is solved so I close ithe issue.

stalkerGH avatar Dec 20 '23 21:12 stalkerGH

@stalkerGH Strange - for me the problem stopped, but I have not yet switched to the new official image. Can you try with my fork on Dockerhub my pull request was based on? jhassler/overpass-api:0.7.61.8 I can maybe look into that on the weekend.

works thx

I have just tried this as well and can confirm that duplicate queries work using jhassler/overpass-api:0.7.61.8, but not using the wiktorn/overpass-api:latest. I think there is an issue with the new official image perhaps?

jkripsos avatar Jan 04 '24 11:01 jkripsos

I did investigate that and I think I found the culprit.

wiktorn/overpass-api:latest is the same as wiktorn/overpass-api:0.7.61, and wiktorn/overpass-api:0.7.61.6

This version of Overpass might have a bug handing this argument. I guess that specifying explicitly wiktorn/overpass-api:0.7.61.8 should fix that.

@mmd-osm looking in Overpass releases I do see that osm-3s_v0.7.61.tar.gz has timestamp similar to osm-3s_v0.7.61.6.tar.gz. Is there a reason why it was not updated or this was just a omission during the release of 0.7.61.7 and 0.7.61.8?

wiktorn avatar Jan 04 '24 19:01 wiktorn