Re: [Htmlparser-user] Re: thread question
Brought to you by:
derrickoswald
From: Derrick O. <Der...@Ro...> - 2004-02-02 23:11:24
|
Steve, Not your server, the other side. If you are using a Sun 1.4 JDK, you can try forcing the TCP/IP read to time-out after a set period. In your mainline, before starting, set these system properties (milliseconds): System.setProperty ("sun.net.client.defaultReadTimeout", "7000"); System.setProperty ("sun.net.client.defaultConnectTimeout", "7000"); Derrick Steve McCann wrote: >Derrick, >I have not been able to get the problem to reproduce. That is, if a >particular URL in a set hangs, if I rerun the exact same set, it >processes fine. It has been a little frustrating... > >You mentioned it might be a server-side issue. Do you mean an issue with >my server dropping the socket? If so, any suggestions on how to get the >parser to recognize this situation and throw an exception of some sort? > >Thanks, >Steve > > > > >Date: Thu, 29 Jan 2004 17:55:00 -0500 >From: Derrick Oswald <Der...@Ro...> >To: htm...@li... >Subject: Re: [Htmlparser-user] thread question >Reply-To: htm...@li... > >Steve, > >The 1.3 NodeReader.getNextLine() issues that message when it encounters >an IOException. >It's unclear why it's looping though. >Have you got a URL that causes it? >Maybe there is a server-side problem and it drops the socket. > >Derrick > >Steve McCann wrote: > > > >>I am currently using Version 1.3 and have a thread problem. In summary, >>I have a list of URLs (approximately 800 at a time) and I start a fixed >>number of threads to parse those pages. On occasion, a thread never >>completes and the log file logs "I/O Exception occurred while reading!" >>until I stop Tomcat. It does not happen often (maybe once every few >>thousand pages...) and I have not been able to reproduce the error in a >>test environment. >> >>Is this an issue that you have come across before? If so, do you have >>any advice on addressing the issue? >> >>Thank you in advance for your assistance. >> >>Steve >> >> >> >> |