Solved

URLConnection timeout in JDK 1.0.2

Posted on 1998-02-06
2
166 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 100 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

726 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