Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2535F1337B49 for ; Thu, 18 Nov 2010 10:41:13 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 11235-08 for ; Thu, 18 Nov 2010 14:41:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id B718E133616B for ; Thu, 18 Nov 2010 10:41:05 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 6A9A6348023; Thu, 18 Nov 2010 06:41:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1JJ0n64xU9Ui; Thu, 18 Nov 2010 06:40:57 -0800 (PST) Received: from perhan.alvh.no-ip.org (unknown [190.95.24.94]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 8923B348022; Thu, 18 Nov 2010 06:40:57 -0800 (PST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id AB2E86E4BB; Thu, 18 Nov 2010 11:40:53 -0300 (CLST) Content-Type: text/plain; charset=UTF-8 Cc: Tom Lane , pgsql-admin Subject: Re: Autovacuum seems to block database: WARNING worker took too long to start From: Alvaro Herrera To: =?utf-8?q?Pablo_Delgado_D=C3=ADaz-Pache?= In-reply-to: References: <6991.1289762128@sss.pgh.pa.us> <1289918622-sup-8461@alvh.no-ip.org> <1289934330-sup-4464@alvh.no-ip.org> Date: Thu, 18 Nov 2010 11:40:53 -0300 Message-Id: <1290091189-sup-9738@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201011/147 X-Sequence-Number: 36113 Excerpts from Pablo Delgado Díaz-Pache's message of jue nov 18 08:57:16 -0300 2010: > Well, we had the problem again. This is what we did > > 1) A "ps" to check what processes were running. Many "postmaster" processes > in defunct state. A few postgres connections still working. A few "psql" (by > shell script) queries hanged (they are scripts to monitor state of database. > We use big-sister to do so). > > The normal state of the server is 1 postmaster pid and many "postgres" > connections in "idle" state. > > This the result when we were having the problem. I've excluded irrelevant > processes. > > *postgres 892 3889 0 09:07 ? 00:01:05 postgres: postgres > international 10.19.0.51(49264) idle* > *postgres 934 3889 0 12:00 ? 00:00:04 [postmaster] * > *postgres 935 3889 0 12:00 ? 00:00:04 [postmaster] * Hmm, these are processes that were forked from postmaster (PID 3889) and died before they could become something useful -- but postmaster hasn't reclaimed yet. Can you see what process 3889 is doing? strace it or get a stacktrace with GDB. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support