X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 22E409DC845 for ; Thu, 9 Mar 2006 16:07:19 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55796-04 for ; Thu, 9 Mar 2006 16:07:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.digitalfairway.ca (ns.digitalfairway.ca [207.164.133.170]) by postgresql.org (Postfix) with ESMTP id 38F0D9DCC78 for ; Thu, 9 Mar 2006 16:07:11 -0400 (AST) Received: from toronto.toronto.digitalfairway.ca (unknown [192.168.100.10]) by mail.digitalfairway.ca (Postfix) with ESMTP id E0E38A06BA for ; Thu, 9 Mar 2006 15:07:07 -0500 (EST) Received: from localhost (toronto.toronto.digitalfairway.ca [127.0.0.1]) by toronto.toronto.digitalfairway.ca (Postfix) with ESMTP id 387F312401F for ; Thu, 9 Mar 2006 15:07:07 -0500 (EST) Received: from toronto.toronto.digitalfairway.ca ([127.0.0.1]) by localhost (toronto.toronto.digitalfairway.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22045-02 for ; Thu, 9 Mar 2006 15:07:07 -0500 (EST) Received: from [192.168.100.50] (unknown [192.168.100.50]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by toronto.toronto.digitalfairway.ca (Postfix) with ESMTP id 2020F1217F5 for ; Thu, 9 Mar 2006 15:07:07 -0500 (EST) From: Jan de Visser To: pgsql-performance@postgresql.org Subject: Re: Hanging queries on dual CPU windows Date: Thu, 9 Mar 2006 15:07:04 -0500 User-Agent: KMail/1.9.1 References: <200603060938.00751.jdevisser@digitalfairway.com> In-Reply-To: <200603060938.00751.jdevisser@digitalfairway.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200603091507.04663.jdevisser@digitalfairway.com> X-Virus-Scanned: amavisd-new at digitalfairway.ca X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.08 required=5 tests=[AWL=0.080] X-Spam-Score: 0.08 X-Spam-Level: X-Archive-Number: 200603/98 X-Sequence-Number: 17535 I have more information on this issue. =46irst of, the problem now happens after about 1-2 hours, as opposed to th= e 6-8=20 I mentioned earlier. Yey for shorter test cycles. =46urtermore, it does not happen on Linux machines, both single CPU and dua= l=20 CPU, nor on single CPU windows machines. We can only reproduce on a dual CP= U=20 windows machine, and if we take one CPU out, it does not happen. I executed the following after it hung: db=3D# select l.pid, c.relname, l.mode, l.granted, l.page, l.tuple=20 from pg_locks l, pg_class c where c.oid =3D l.relation order by l.pid; Which showed me that several transactions where waiting for a particular ro= w=20 which was locked by another transaction. This transaction had no pending=20 locks (so no deadlock), but just does not complete and hence never=20 relinquishes the lock. What gives? has anybody ever heard of problems like this on dual CPU window= s=20 machines? jan On Monday 06 March 2006 09:38, Jan de Visser wrote: > Hello, > > While doing performance tests on Windows Server 2003 we observed to > following two problems. > > Environment: J2EE application running in JBoss application server, against > pgsql 8.1 database. Load is caused by a smallish number of (very) complex > transactions, typically about 5-10 concurrently. > > The first one, which bothers me the most, is that after about 6-8 hours t= he > application stops processing. No errors are reported, neither by the JDBC > driver nor by the server, but when I kill the application server, I see > that all my connections hang in a SQL statements (which never seem to > return): > > 2006-03-03 08:17:12 4504 6632560 LOG: =A0duration: 45087000.000 ms > =A0statement: EXECUTE =A0[PREPARE: =A0SELECT objID FROM objects= WHERE > objID =3D $1 FOR UPDATE] > > I think I can reliably reproduce this by loading the app, and waiting a > couple of hours. =2D-=20 =2D------------------------------------------------------------- Jan de Visser =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 jdevisser@digitalfair= way.com =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Baruk Khazad! Khazad ai-menu! =2D-------------------------------------------------------------