Re: [Htmlparser-user] Hang out when fetching page - JDK 1.5
Brought to you by:
derrickoswald
From: Derrick O. <Der...@Ro...> - 2006-04-06 04:16:53
|
You might want to set the connect timeout in your mainline: System.setProperty ("sun.net.client.defaultReadTimeout", "7000"); System.setProperty ("sun.net.client.defaultConnectTimeout", "7000"); Java Programmer wrote: >Hello, >I have problem with hanging out fetching threads - in few cases the >running threads stops when entering such method: > >public void fetch() throws ParserException{ > Parser parser = new Parser(this.url); > visitor = new SimplePageVisitor(); > parser.visitAllNodesWith(visitor); >} > >I logged what cause hang out and code stops right on: Parser parser = >new Parser(this.url); > >I saw several times that "java.net.SocketTimeoutException: Read timed >out" was thrown, but not in that case (thread just hangs for hours >until I don't kill it by hand). > >I searched for solution but without luck. > >If anyone can help I apperciate it. > >Best regards, >Adr > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 >_______________________________________________ >Htmlparser-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlparser-user > > > |