Backend dies for DBI

From: Bjorn Solberg <bjorn(at)geocities(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Backend dies for DBI
Date: 2001-03-06 21:10:39
Message-ID: m3k862d2nk.fsf@pacbell.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I have looked at the FAQs and archives, but haven't seen anything
resembling this so please bear with me:

Setup:

Linux x86, 2.2.16
Apache 1.3.19
mod_perl 1.25
HTML-Mason-0.89
PostgreSQL 7.0.3
DBI-1.14
DBD-Pg-0.95

Mason (which is a template package on top of mod_perl, see
http://www.masonhq.com/) opens a connection to the database, using DBI.
This handle is then used for subsequent DB access. Mason runs within the
web server.

This worked flawlessly until I had a power outage a month or so ago.
Since then, the backend postmaster process seems to die now and then, and
I have been unable to reproduce it consistently. That is, the number of
times I access the (dynamic HTML) page (and thus the DB) before the DB
crashes, varies. The log file from postmaster simply says:

--->
StartTransactionCommand
[...]
ProcessQuery
CommitTransactionCommand
proc_exit(0)
shmem_exit(0)
exit(0)
/usr/local/pgsql/bin/postmaster: reaping dead processes...
/usr/local/pgsql/bin/postmaster: CleanupProc: pid 1297 exited with status 0
proc_exit(0)
shmem_exit(0)
exit(0)
/usr/local/pgsql/bin/postmaster: reaping dead processes...
/usr/local/pgsql/bin/postmaster: CleanupProc: pid 1298 exited with status 0
---<

The postmaster is started like this:

/usr/local/pgsql/bin/postmaster -d 2 -D /usr/local/pgsql/data >> /usr/local/pgsql/pgsql.log 2>&1

DBI (I think) sometimes output a message like "Backend message type 0x50
arrived while idle". This can happen several times, and the crash does
not occur directly following any of the messages.

The DBI error message simply says

--->
DBD::Pg::st execute failed: pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
---<

The same is true for Apache 1.3.12, mod_perl 1.24. Any pointers and
hints so I can figure out how to make the backend not die, are greatly
appreciated.

Thanks,

Bjorn.

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Cedar Cox 2001-03-07 09:44:42 Re: Re: can't delete record
Previous Message Cedar Cox 2001-03-06 20:36:49 can't delete record