Menu

#230 java.net.SocketTimeoutException: Read timed out

latest_beta_version
open
nobody
None
1
2015-02-23
2012-10-25
smartgig
No

Hello,

I've set a custom map source. As the map images are generated by a php file a delay is expected to exist between images.

screenshot

The download process of about half images are failed by the java timeout error. How I can increase the timeout ?

Here's the log file :

2012-10-25 18:19:27,030 TRACE [Map preview thread 2] TileLoader: Downloading of tile 3/4/2@Rah va Roosta failed
java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at mobac.program.download.TileDownLoader.downloadTileAndUpdateStore(TileDownLoader.java:158)
    at mobac.program.download.TileDownLoader.downloadTileAndUpdateStore(TileDownLoader.java:135)
    at mobac.program.download.TileDownLoader.getImage(TileDownLoader.java:93)
    at mobac.mapsources.custom.CustomMapSource.getTileData(CustomMapSource.java:156)
    at mobac.mapsources.custom.CustomMapSource.getTileImage(CustomMapSource.java:167)
    at mobac.gui.mapview.TileLoader$TileAsyncLoadJob.loadOrUpdateTile(TileLoader.java:101)
    at mobac.gui.mapview.TileLoader$TileAsyncLoadJob.run(TileLoader.java:95)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Discussion

  • r_x

    r_x - 2012-10-25

    There is already a solution for your problem:

    Edit the settings.xml file with and editor and increase the values for
    <httpConnectionTimeout> and <httpReadTimeout> (noted in seconds)

    See also:
    http://sourceforge.net/apps/phpbb/mobac/viewtopic.php?f=1&t=58

     
  • smartgig

    smartgig - 2012-10-25

    I've fixed that, Now the following error occurs for some images :

    2012-10-25 18:58:31,183 TRACE [Map preview thread 4] TileDownLoader: Content (text/html): 1
    2012-10-25 18:58:31,186 TRACE [Map preview thread 4] TileLoader: Downloading of tile 8/166/104@Rah va Roosta failed
    mobac.exceptions.UnrecoverableDownloadException: Content type of the loaded image is unknown: text/html
        at mobac.program.download.TileDownLoader.checkContentType(TileDownLoader.java:383)
        at mobac.program.download.TileDownLoader.downloadTileAndUpdateStore(TileDownLoader.java:164)
        at mobac.program.download.TileDownLoader.downloadTileAndUpdateStore(TileDownLoader.java:135)
        at mobac.program.download.TileDownLoader.getImage(TileDownLoader.java:93)
        at mobac.mapsources.custom.CustomMapSource.getTileData(CustomMapSource.java:156)
        at mobac.mapsources.custom.CustomMapSource.getTileImage(CustomMapSource.java:167)
        at mobac.gui.mapview.TileLoader$TileAsyncLoadJob.loadOrUpdateTile(TileLoader.java:101)
        at mobac.gui.mapview.TileLoader$TileAsyncLoadJob.run(TileLoader.java:95)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    

    How I can see the downloaded file ? I can see no problem when I test the failed image in my browser.

     
  • r_x

    r_x - 2012-10-25

    Activate logging as described in the README.HTM file and change the priority value from DEBUG to TRACE. Then you will see in the logging file the returned html content.

     

Log in to post a comment.