Re: Backend dies for DBI

From: Bjorn Halvor Solberg <bhso(at)pacbell(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Backend dies for DBI
Date: 2001-03-10 00:29:21
Message-ID: m3k85ycvq6.fsf@pacbell.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Tom Lane writes:

>> What confuses me is that it ran fine for a couple of months. Then, after
>> the power outage, it crashes every few hours, resulting in having to
>> restart the web server to regain the DB handle.

> Hmm. Possibly some corrupted data in the database now?

That thought did come to mind, but manual queries go through just fine.
I did vacuum the database, but that didn't help.

Maybe using just one DBI database handle is the wrong way to use it?
Still, what puzzles me is that it worked fine for months before the power
outage. I've changed it to open and close the database handle (connect/
disconnect) for every web page served now, instead of having just one per
server process for the lifetime of the process, and haven't seen the
problem since. I suppose there are performance issues with that, but the
database and nature of the access is such that that isn't important now. :)

The database is on the local machine, the same host as the web server is
running on, so it is not due to an NFS problem.

I suppose there are more people out there using PostgreSQL through DBI in
Apache, either through mod_perl, Mason or other means - what do you do?
Connect and disconnect per serverd web page, or keep one connection open
for each web server process?

Thanks for hints and help!

Bjorn.

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2001-03-10 03:39:32 Re: Backend dies for DBI
Previous Message jlhan 2001-03-09 18:36:14 ecpg?