deadlock problem in Ad serving..

From: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: deadlock problem in Ad serving..
Date: 2003-01-20 08:48:54
Message-ID: 200301201418.54276.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I use postgresql in serving Ads and counting impression of the ad banners.

whenever an Ad is served I do a update.

update banner_stats set imp=imp+1 where uniqid=4330
in a transaction.

In a busy web environment like ours there are high chances that the same page is displyed
concurrently to two different viewers.

I have been able to verify using two psql sessions that unless one transaction commits
the update, the update from the second client (also in a transaction block) keeps
wating to happen.

as a result such updates get queued up and i finally get "dead lock detected" error.

~~~~~~~~~~~~~~~~~~~~~~
Error: DBD::Pg::st execute failed: ERROR: deadlock detected at
/usr/local/perlapache/lib/perl/Banner.pm line 71, <GEN1> line 7.
~~~~~~~~~~~~~~~~~~~~~~

can anyone tell me how shud i go ahead tosolve this problem

regds
mallah.

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bhuvan A 2003-01-20 10:02:33 Re: deadlock problem in Ad serving..
Previous Message Yudha Setiawan 2003-01-20 03:29:39 Re: Do Something before Abort on Trigger ???