Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f27J6Px40266 for ; Wed, 7 Mar 2001 14:06:25 -0500 (EST) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from mail.pacbell.net (adsl-63-204-248-30.dsl.lsan03.pacbell.net [63.204.248.30]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f26LAfx84414 for ; Tue, 6 Mar 2001 16:10:41 -0500 (EST) (envelope-from bhso@pacbell.net) Received: (from bhso@localhost) by mail.pacbell.net (8.9.3/8.9.3) id NAA02812; Tue, 6 Mar 2001 13:10:39 -0800 X-Authentication-Warning: blanc.pacbell.net: bhso set sender to bhso@pacbell.net using -f From: Bjorn Solberg To: pgsql-interfaces@postgresql.org Subject: Backend dies for DBI Date: 06 Mar 2001 13:10:39 -0800 In-Reply-To: Soma Interesting's message of "Tue, 06 Mar 2001 12:00:05 -0800" Message-ID: Lines: 64 User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200103/66 X-Sequence-Number: 1227 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.