maproulette / maproulette/maproulette-backend

Read timeout to overpass-api after 120000 ms

Open
#889 4 comments 2 reactions 0 assignees View on GitHub

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:

  1. 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]

  1. Run the challenge
  2. Wait 120s to get the following error message Read timeout to overpass-api.de/xxx.xxx.xxx.xxx:80 after 120000 ms
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.