X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 668E211F6C5D for ; Wed, 5 Apr 2006 03:06:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 49814-01-3 for ; Wed, 5 Apr 2006 03:06:39 -0300 (ADT) X-Greylist: delayed 20:59:59.574974 by SQLgrey- Received: from lvs2.netcore.co.in (lvs2.netcore.co.in [202.162.240.2]) by postgresql.org (Postfix) with ESMTP id 498D211F6C2E for ; Wed, 5 Apr 2006 03:06:37 -0300 (ADT) Received: from uucp3.netcore.co.in (uucp3.netcore.co.in [202.162.229.13]) by lvs2.netcore.co.in (Postfix) with ESMTP id 96582351E82; Wed, 5 Apr 2006 11:36:35 +0530 (IST) Received: from uucp1.netcore.co.in (unknown [192.168.2.1]) by uucp3.netcore.co.in (Postfix) with ESMTP id EC6C73B894; Wed, 5 Apr 2006 11:36:33 +0530 (IST) Received: by uucp1.netcore.co.in (Postfix, from userid 10) id A997A188C; Wed, 5 Apr 2006 11:36:34 +0530 (IST) Received: from pavan.psmw (unknown [192.168.70.1]) by ho.netcore.co.in (Postfix) with ESMTP id E54D0834019; Wed, 5 Apr 2006 11:53:02 +0530 (IST) Subject: Re: thread hang on execute call From: Pavan Kumar To: Dave Cramer Cc: pgsql-jdbc@postgresql.org In-Reply-To: <3B4C50E2-30E4-499B-A46D-74FF77E0A621@fastcrypt.com> References: <1144141469.16392.18.camel@pavan.psmw> <3B4C50E2-30E4-499B-A46D-74FF77E0A621@fastcrypt.com> Content-Type: text/plain Date: Wed, 05 Apr 2006 11:35:04 +0530 Message-Id: <1144217104.16392.37.camel@pavan.psmw> Mime-Version: 1.0 X-Mailer: Evolution 2.4.0 Content-Transfer-Encoding: 7bit X-MailServ-MailFilter-MailScanner-Information: Please contact the ISP for more information X-MailServ-MailFilter-MailScanner: Found to be clean X-MailScanner-From: pavan@netcore.co.in X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200604/44 X-Sequence-Number: 14978 i am using dbcp apache connection pooling. i don't think it would allocate same connection to two thread until it is released by the other thread. by seeing stack trance of postgres and java process it seems both are waiting for input....i couldn't understand how it could be possible. On Tue, 2006-04-04 at 11:14 -0400, Dave Cramer wrote: > Pavan, > > You cannot share connections across threads without locking. Is it > possible that you are doing this ? > > Dave > On 4-Apr-06, at 5:04 AM, Pavan Kumar wrote: > > > Hi > > i have some worker threads that perform some database intensive > > operation after each fixed interval.so they keeps running. > > after 2 days all threads got hang on execute call on jdbc driver. > > there are around 60000 rows in table. > > i get no response and following is > > > > > > here is stack trace of postgres process > > > > #0 0x003437a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 > > #1 0x00424451 in recv () from /lib/tls/libc.so.6 > > #2 0x08145aae in secure_read () > > #3 0x0814c062 in pq_recvbuf () > > #4 0x0814c121 in pq_getbyte () > > #5 0x081ad5fc in PostgresMain () > > #6 0x0818765d in ServerLoop () > > #7 0x0818904f in PostmasterMain () > > #8 0x0814dd18 in main () > > > > > > and following is stack trace of java thread > > > > > > Thread 12912: (state = IN_NATIVE) > > - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, > > byte[], int, int, int) @bci=0 (Compiled frame; information may be > > imprecise) > > - java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 > > (Compiled frame) > > - java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled > > frame) > > - java.io.BufferedInputStream.read() @bci=12, line=235 (Compiled > > frame) > > - org.postgresql.core.PGStream.ReceiveChar() @bci=4, line=254 > > (Compiled > > frame) > > - > > org.postgresql.core.v3.QueryExecutorImpl.execute > > (org.postgresql.core.Query, org.postgresql.core.ParameterList, > > org.postgresql.core.ResultHandler, int, int, int) @bci=129, > > line=188 (Interpreted frame) > > - > > org.postgresql.jdbc2.AbstractJdbc2Statement.execute > > (org.postgresql.core.Query, org.postgresql.core.ParameterList, int) > > @bci=199, line=430 (Interpreted frame) > > - org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(int) > > @bci=14, line=346 (Compiled frame) > > - org.postgresql.jdbc2.AbstractJdbc2Statement.execute() @bci=2, > > line=339 (Interpreted frame) > > - org.apache.commons.dbcp.DelegatingPreparedStatement.execute() > > @bci=8, > > line=168 (Interpreted frame) > > > > > > > > ---------------------------------------------------------------------- > > -- > > Netcore Solutions Pvt. Ltd. > > Website: http://www.netcore.co.in > > Spamtraps: http://cleanmail.netcore.co.in/directory.html > > > > Support FAQ : http://support.netcore.co.in/ > > > > This e-mail contains confidential and/or privileged information. If > > you are not the intended recipient (or have received this e-mail in > > error) please notify the sender immediately and delete this e- > > mail. Any > > unauthorized copying, disclosure, use or distribution of the > > material in > > this e-mail is strictly forbidden. > > > > ---------------------------------------------------------------------- > > -- > > > > > > ---------------------------(end of > > broadcast)--------------------------- > > TIP 4: Have you searched our list archives? > > > > http://archives.postgresql.org > > > ------------------------------------------------------------------------ Netcore Solutions Pvt. Ltd. Website: http://www.netcore.co.in Spamtraps: http://cleanmail.netcore.co.in/directory.html Support FAQ : http://support.netcore.co.in/ This e-mail contains confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure, use or distribution of the material in this e-mail is strictly forbidden. ------------------------------------------------------------------------