maproulette / maproulette/maproulette-backend
Read timeout to overpass-api after 120000 ms
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 53
- Forks
- 39
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 12
Description
Hello,
I love to create challenges with Overpass API, but recently I 'saw' that the default timeout was lowered from 180s to 120s 😭
So I read the source code and I saw that if my overpass query start with [out:json] or [timeout:_TIME_] then Maproulette should take in account my 'custom timeout'. But sadly something is not working properly and my custom timeout is not used.
Here is a way to reproduce the issue:
- Create a challenge with the following overpass query:
[timeout:180];
node[amenity=drinking_water];
out;
// DO NOT USE THIS QUERY FOR REGULAR CHALLENGE
// Because It queries all the drinking water node worldwide!!!
or the same query but starting with [out:json][timeout:180]
- Run the challenge
- Wait 120s to get the following error message
Read timeout to overpass-api.de/xxx.xxx.xxx.xxx:80 after 120000 ms - BUG! The query should have stoped at the correct 180s timeout and not an arbitrary 120s.
Part of the code to handle this timeout is in this file: ChallengeProvider.scala
Thanks all contributors for the good work done on Maproulette ❤️
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in app/org/maproulette/provider/ChallengeProvider.scala and trace how the Overpass query's timeout is parsed and applied. Reproduce the issue with the documented [timeout:180] challenge query and observe the 120-second failure. Done means the custom 180-second timeout is honored instead of the default 120 seconds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100