| 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?
|
 |
 |
|
|
subject: Sometimes not receiving IOException on URL.openconnection
|
|
|