Solved

URLConnection timeout in JDK 1.0.2

Posted on 1998-02-06
2
165 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb stateless example 2 63
Why doesn't this text field show up on my Applet frame? 2 40
Eclipse with various Java releases 7 84
program arguments vs VM arguments 4 54
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

738 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