Deadlock situation?

From: "Dan Armbrust" <daniel(dot)armbrust(dot)list(at)gmail(dot)com>
To: "pgsql general" <pgsql-general(at)postgresql(dot)org>
Subject: Deadlock situation?
Date: 2008-04-29 21:54:48
Message-ID: 82f04dc40804291454r36e05089kaa310a73e2061282@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have an app that we were load testing - it maintains a pool of
connections to PostgreSQL - 8.3.1

Suddenly, after running fine for weeks, the app hung - unable to get a
free connection from the pool.

select * from pg_stat_activity;" shows me that most of my connections
in a COMMIT phase:

03:05:37.73064-05 | 2008-04-24 03:05:38.419796-05 | 2008-04-24
02:11:53.908518-05 | 127.0.0.1 | 53807
16385 | ispaaa | 953 | 16384 | pslogin | COMMIT | f
| 2008-04-24

While some are in a SELECT:

16385 | ispaaa | 1181 | 16384 | pslogin | select
dynamichos0_.ethernetmacaddr as ethernet1_0_, dynamichos0_.ipaddr as
ipaddr0_, dynamichos0_.cpemac as cpemac0_, dynamichos0_.regtime as
regtime0_, dynamichos0_.leasetime as leasetime0_,
dynamichos0_.last_updated as last5_0_ from iphost dynamichos0_, cpe
cpe1_ where dynamichos0_.cpemac=cpe1_.cpemac and 1=1 and
dynamichos0_.ethernetmacaddr=$1 and dynamichos0_.cpemac=$2 and
cpe1_.regBaseId=$3 and dynamichos0_.ipaddr<>$4 | f |
2008-04-24 03:05:37.734041-05 | 2008-04-24 03:05:38.405854-05 |
2008-04-24 02:41:54.413337-05 | 127.0.0.1 | 55363

Perhaps VACUUM had something to do with it?:

16385 | ispaaa | 8956 | 16384 | pslogin | delete from iphost
where leasetime<$1 | f | 2008-04-24 18:43:29.920069-05 |
2008-04-24 18:43:30.116435-05 | 2008-04-24 18:41:59.071032-05 |
127.0.0.1 |

49069 16385 | ispaaa | 1618 | 10 | postgres | autovacuum:
VACUUM public.iphost | f | 2008-04-24 03:05:13.212436-05 |
2008-04-24 03:05:13.212436-05 | 2008-04-24 03:05:12.526611-05 |
|

Where should I begin to look for the source of this problem?

Thanks for any info,

Dan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2008-04-29 22:10:31 Re: Deadlock situation?
Previous Message Andy Anderson 2008-04-29 21:46:35 Character Data Type 'Name'