Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 80332 invoked from network); 14 Dec 2005 19:24:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Dec 2005 19:24:44 -0000 Received: (qmail 23630 invoked by uid 500); 14 Dec 2005 19:24:43 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 23614 invoked by uid 500); 14 Dec 2005 19:24:42 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 23603 invoked by uid 99); 14 Dec 2005 19:24:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2005 11:24:42 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.39.202] (HELO web50311.mail.yahoo.com) (206.190.39.202) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 14 Dec 2005 11:24:40 -0800 Received: (qmail 25642 invoked by uid 60001); 14 Dec 2005 19:24:19 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UvrDV54zJjuKTrzjZOhihzNepcAOnPGvaY7w54W5Q56uAl/I5veXz6e78FLSoxvwzIddtjOw1Cp9QpEsLDvD2Iac4dNQuK2CFivKUOnfyf/OpBeNfZ+bdoYAiTyLm5oyhCZ69/Ab/jrhXjHjzhP3ztc068RD9idOLqmlKVbsOhY= ; Message-ID: <20051214192419.25640.qmail@web50311.mail.yahoo.com> Received: from [216.139.146.22] by web50311.mail.yahoo.com via HTTP; Wed, 14 Dec 2005 11:24:19 PST Date: Wed, 14 Dec 2005 11:24:19 -0800 (PST) From: George Ludwig Subject: Re: HttpClient seems to hang on SocketNativeIO.read To: HttpClient User Discussion In-Reply-To: <43A06F7B.6010901@dubioso.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Roland, Thanks for the response. I'd been searching the archives for a bit, and discovered a couple of things: 1. I set the "Connection: close" header. That seemed to help. 2. I set the linger value to 4000. That also seemed to help. Right now, I'm not seeing any stuck download threads...but the day is young! Best, George --- Roland Weber wrote: > Hello George, > > it looks like your message somehow fell through the > cracks. > Sorry for the late response. > > > "ThreadPool-Crawler DownloadJob > > PooledThread-1-running" id=436 idx=0x62 > > tid=-1569055552 prio=5 alive, in native, daemon > > at jrockit/net/SocketNativeIO.read(IIII)I(Native > Method) > > at > jrockit/net/SocketNativeIO.read(Ljava/io/FileDescriptor;III)I(Unknown > Source)[inlined] > > at java/net/AbstractSocketImpl$1.read(II)I(Unknown > Source)[optimized] > > ^-- Holding lock: > > java/net/AbstractSocketImpl$1@0x5e481fd0[thin > lock] > > at > jrockit/io/NativeIOInputStream.read(I[BI)I(Unknown > Source)[inlined] > > at > jrockit/io/NativeIOInputStream.read([BII)I(Unknown > Source)[optimized] > > at > java/io/BufferedInputStream.fill()V(BufferedInputStream.java:218)[inlined] > > [...] > > My socket timeout is set to 54 seconds, so I don't > > understand why these sockets go off into space for > > many hours, never to come back. > > Well, your sockets seem to be jrockit specific ones. > Maybe there is a bug in the socket implementation? > Depending on the Java version, HttpClient implements > some > socket timeouts by spawning a timout thread which > eventually > interrupts the blocked thread after the timeout. If > jrockit > sockets do not unblock the thread in that case, > there is the > explanation. With JDK 1.4, the timeout is set at the > socket > itself. > > I suggest you enable HttpClient logging. In your > case, you > probably don't need the wire log to understand what > is > going on. > > hope that helps, > Roland > > > > > > Here's my HttpClient initialization code: > > > > static { > > HttpConnectionManagerParams connMgrParams = > > new HttpConnectionManagerParams(); > > connMgrParams.setConnectionTimeout(4000); > > connMgrParams.setSoTimeout(4000); > > connMgrParams.setMaxConnectionsPerHost( > > HostConfiguration.ANY_HOST_CONFIGURATION,1); > > connMgrParams.setMaxTotalConnections(300); > > MultiThreadedHttpConnectionManager connMgr = > > new MultiThreadedHttpConnectionManager(); > > connMgr.setParams(connMgrParams); > > httpClient= new HttpClient(connMgr); > > } > > > > I also noticed in the jrockit memory leak tool > that > > even though I set ignoreCookies to be true before > > every call, I still acumulate thousands of then. > Is > > this normal? > > > > Cheers, > > > > George > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > httpclient-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: > httpclient-user-help@jakarta.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > httpclient-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: > httpclient-user-help@jakarta.apache.org > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org