From: Bjorn Halvor Solberg <bhso@pacbell.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Backend dies for DBI
Date: 09 Mar 2001 16:29:21 -0800
Message-ID: <m3k85ycvq6.fsf@pacbell.net> (raw)
References: <m3k862d2nk.fsf@pacbell.net>
<22575.984012545@sss.pgh.pa.us>
<m33dcpqcyq.fsf@pacbell.net>
<24449.984016287@sss.pgh.pa.us>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: bhso@pacbell.net, tgl@sss.pgh.pa.us
Subject: Re: Backend dies for DBI
In-Reply-To: <m3k85ycvq6.fsf@pacbell.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox