#11693 closed defect (fixed)
Needs a higher timeout with RemoteControl and overpass
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.01 |
Component: | Core | Version: | |
Keywords: | mirrored_download | Cc: |
Description
When trying to export a slower query from overpass into JOSM we see this:
ERRO: org.openstreetmap.josm.io.OsmTransferException: java.net.SocketTimeoutException: Read timed out. Causa: java.net.SocketTimeoutException: Read timed out org.openstreetmap.josm.io.OsmTransferException: java.net.SocketTimeoutException: Read timed out at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:205) at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:104) at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:91) at org.openstreetmap.josm.io.OsmServerLocationReader$OsmParser.parse(OsmServerLocationReader.java:128) at org.openstreetmap.josm.io.OsmServerLocationReader$OsmParser.parse(OsmServerLocationReader.java:121) at org.openstreetmap.josm.io.OsmServerLocationReader.doParse(OsmServerLocationReader.java:51) at org.openstreetmap.josm.io.OsmServerLocationReader.parseOsm(OsmServerLocationReader.java:68) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:306) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:314) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:93) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:161) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketInputStream.read(SocketInputStream.java:122) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read1(BufferedInputStream.java:275) at java.io.BufferedInputStream.read(BufferedInputStream.java:334) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1324) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:170) ... 15 more
Note that the timeout doesn't happen with overpass, but in JOSM.
The slower (but valid) query: http://overpass-turbo.eu/s/as4
JOSM
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2015-07-15 01:32:25 Last Changed Author: wiktorn Revision: 8603 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Relative URL: ^/trunk URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2015-07-14 23:30:40 +0200 (Tue, 14 Jul 2015) Last Changed Rev: 8603 Identification: JOSM/1.5 (8603 pt_BR) Linux Debian GNU/Linux unstable (sid) Memory Usage: 401 MB / 4029 MB (122 MB allocated, but free) Java version: 1.7.0_79, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-7-jre:amd64-7u79-2.5.5-1 VM arguments: [-Dawt.useSystemAAFontSettings=on] Dataset consistency test: No problems found Plugins: - AddrInterpolation (31241) - Create_grid_of_ways (31241) - FastDraw (31265) - FixAddresses (31241) - OpeningHoursEditor (31241) - PicLayer (31241) - SimplifyArea (31241) - buildings_tools (31361) - download_along (31241) - editgpx (31241) - geotools (31126) - graphview (31241) - jts (31126) - measurement (31289) - merge-overlap (31241) - opendata (31241) - pdfimport (31241) - poly (31241) - reverter (31241) - tagging-preset-tester (31241) - todo (29154) - turnrestrictions (31241) - undelete (31241) - utilsplugin2 (31241)
Attachments (0)
Change History (10)
comment:1 by , 10 years ago
comment:2 by , 9 years ago
Keywords: | mirrored_download added |
---|
comment:4 by , 9 years ago
Just want to add a note that socket.timeout.read is a user setting that can be changed by going to Preferences --> Advanced Preferences in JOSM
(For anyone else arriving here from Google that needs a work-around)
comment:6 by , 9 years ago
Milestone: | → 16.01 |
---|
comment:7 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Sorry to reopen, but there is one case where I guess it won't work:
when there isn't any [timeout]
in the overpass query (like the example at the description).
No [timeout]
is the same as a very high timeout (I guess it's even higher than 180
as https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#timeout says)
To be safe, shouldn't it use a timeout of 180000
(180 * 1000) in an else
in the code?
comment:8 by , 9 years ago
I thought about this one before … My consideration for not defaulting to 180s is that a user may have underestimated the complexity/result-size of the query and might be happier to have a shorter timeout set … However, s/he could also cancel if it's taking too long.
I'm undecided ;)
comment:10 by , 8 years ago
Maybe the user dialogues could have a timeout override for longer operations. I had the same issue using the reverter plugin where fetching the .osc data took a bit more than 30 s.
Increasing
socket.timeout.read
to60
solves this, but could overpass somehow be special cased? (have a different timeout from the rest)