Modify

Opened 13 years ago

Closed 12 years ago

#6823 closed defect (fixed)

josm starts extremely slow when osm api is offline

Reported by: Cobra Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description (last modified by simon04)

When trying to start josm while the osm api is offline, josm hangs for 10 minutes without any visible feedback or any possibility to cancel the capabilities request or exit josm.

The log doesn't tell much for ~9 Minutes:

Build-Date: 2011-08-31 16:06:11
Revision: 4385
Is-Local-Build: true

loading plugin 'proj4j' (version 26509)
GET http://api.openstreetmap.org/api/capabilities... GET http://api.openstreetmap.org/api/capabilities...

For the moment, is there any possibility to set a lower timeout or start josm with a "work offline" flag?

Attachments (0)

Change History (8)

in reply to:  description comment:1 by skyper, 13 years ago

Replying to Cobra:

For the moment, is there any possibility start josm with a "work offline" flag?

I requested this a time ago (#4614).

comment:2 by simon04, 12 years ago

Description: modified (diff)

See also #7140.

comment:3 by bastiK, 12 years ago

I can repoduce. (Start a local server like this

#!/usr/bin/ruby

require 'webrick'
include WEBrick

def handl(req)
    for i in (1..20)
        sleep(1)
        puts i
    end
end

HTTPServer.new(:Port => 3333, :DocumentRoot => Dir.pwd, :MaxClients => 1000, :RequestCallback=>lambda{|x| handl(x)}).start

and put http://localhost:3333/ as API URL.)

comment:4 by stoecker, 12 years ago

Hmm, we have already timeout variables with about 30 seconds, but they must be activated for each connection individual. Probably some are still missing these settings.

comment:5 by bastiK, 12 years ago

In [4854/josm]:

see #6823 - josm starts extremely slow when osm api is offline

comment:6 by bastiK, 12 years ago

This fixes the specific problem. We should probably set a read timeout for the other HttpURLConnections in the code as well.

comment:7 by bastiK, 12 years ago

In [4859/josm]:

no read timeout for normal API connections (see #6823, see #7305)

in reply to:  6 comment:8 by bastiK, 12 years ago

Resolution: fixed
Status: newclosed

Replying to bastiK:

We should probably set a read timeout for the other HttpURLConnections in the code as well.

Better set no read timeout (or several minutes) for API, WMS and similar requests, because the remote server has to "prepare" the answer and this can take some time.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.