?
Solved

URLConnection timeout in JDK 1.0.2

Posted on 1998-02-06
2
Medium Priority
?
170 Views
Last Modified: 2010-04-16
I am calling URL's from my applet with some specified parameters, this URL then performs a query against a database.  These queries can take anywhere from seconds to an hour.  With the longer queries, java receives an IOException after about 10 minutes of waiting.  Is there any way around this behavior?

Also, when I try to recover from this IOException, the next call to the web server isn't accepted.  Is this because these two requests are in the same thread and it thinks the other connection is still open?  The other connection shouldn't still be open though, as I call my closing method in the finally block after I catch the first IOException.

Any help would be appreciated.  Thanks.
0
Comment
Question by:lmarlow
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 300 total points
ID: 1232916
I don't believe that you can change this behavior.  At least not in your Java application.  I think you are running into an underlying operating system timeout that is eventually getting back to Java as an error.  How about another suggestion?  Instead of just having the connection sit idle while your query processes, how about sending back a progress update every so often?  Not only would this keep the time-out from happening, it might pacify your savage user who doesn't know why the darned thing is taking so long.
0
 

Author Comment

by:lmarlow
ID: 1232917
So, if I was to send back some sort of progress indicator, the OS would think that the connection was still alive, and keep it open?  Or does would it close it after 10 minutes anyway, just because it doesn't like to have HTTP requests open for more than 10 minutes?

Do you have any idea why the web server wouldn't accept another request while the initial page was being processed?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month16 days, 18 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question