wood burning stoves 2.0*
The moose likes JDBC and the fly likes Sometimes not receiving IOException on URL.openconnection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Sometimes not receiving IOException on URL.openconnection" Watch "Sometimes not receiving IOException on URL.openconnection" New topic
Author

Sometimes not receiving IOException on URL.openconnection

Steve Liu Steve
Greenhorn

Joined: Sep 05, 2007
Posts: 4
My servlet accesses DB via a URL invoke.
This has been working fine for long time
However, today, when the DB went down, I found that the IOException was sometimes not being thrown. The openConnection never comes back and the socket handle appears stuck. As this happens more and more, it reaches the max filehandle and stops processing requests.

Question: why am I sometimes not getting an IOException?
What can I do so that my filehandles don't run out?
java 1.4.2_05 tomcat 4.1
Steve Liu Steve
Greenhorn

Joined: Sep 05, 2007
Posts: 4
hmmm... probably should have been moved to the Sockets and Internet Protocols forum instead... but whatever.

anyhow, I found this:
http://www.velocityreviews.com/forums/t130657-httpurlconnection-timeout-solution.html

I'm going to try to implement it and see if I can get better reliability and control on the socket. Anyone try it? Anyone has advice on how well or not it works?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sometimes not receiving IOException on URL.openconnection
 
Similar Threads
display unicode characters in midlet
B&S Required interface
Help! Getting IOException and Communication Link error with DB
Hard disk full but no IOException
How to handle a hanging servlet / servlet timeout?