X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 12B5FD1B4FD for ; Sat, 27 Sep 2003 03:12:05 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 74886-06 for ; Sat, 27 Sep 2003 00:11:53 -0300 (ADT) Received: from mail.linux-delhi.org (unknown [203.94.203.152]) by svr1.postgresql.org (Postfix) with ESMTP id D181DD1B508 for ; Sat, 27 Sep 2003 00:11:49 -0300 (ADT) Received: from mail.linux-delhi.org (localhost [127.0.0.1]) by mail.linux-delhi.org (8.12.8/8.12.8) with ESMTP id h8R3BZVA005187 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 27 Sep 2003 08:41:35 +0530 Received: (from raju@localhost) by mail.linux-delhi.org (8.12.8/8.12.8/Submit) id h8R3BPRA005180; Sat, 27 Sep 2003 08:41:25 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16244.65500.856294.968998@mail.linux-delhi.org> Date: Sat, 27 Sep 2003 08:41:24 +0530 To: pgsql-admin@postgresql.org Subject: Re: Postgresql going to sleep? In-Reply-To: <5849.1064536223@sss.pgh.pa.us> References: <16243.16322.159906.61824@mail.linux-delhi.org> <5849.1064536223@sss.pgh.pa.us> X-Mailer: VM 7.07 under 21.4 (patch 8) "Honest Recruiter" XEmacs Lucid From: Raj Mathur X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/456 X-Sequence-Number: 10544 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >>>>> "Tom" == Tom Lane writes: Tom> Raj Mathur writes: >> I'm consistently getting into a situation where the database >> client just goes to sleep in a query after some number of >> queries in quick succession. Using PostgreSQL 7.2.3 on Red Hat >> Linux 8.0. The postgres process shows up as ``idle in >> transaction'' in a ps. Tom> In that case, the backend is waiting for input from the Tom> client. Tom> If the client thinks it is waiting for the backend, I'd Tom> wonder about a missing "fflush" or something like that. What Tom> client software are you using? Thanks for the tip... I had a closer look at the client (did I mention I was running Perl/DBI as a CGI?) and found that there's some issue in the way Apache handles stderr prints from a CGI: if the CGI takes a long time to execute and generates too much output on stderr, Apache just puts it to sleep. I have all my SQL statements being printed to the Apache log before execution, and after a while the log buffer or whatever would just fill up and suspend the process. Figuring out a workaround (better than the open STDERR,">/tmp/STDERR" route :) for this, but the program is working as it should now. Or at least working, trying to make it comply with the requirements :) At least it's not a PgSQL problem. Regards, - -- Raju - -- Raj Mathur raju@kandalaya.org http://kandalaya.org/ GPG: 78D4 FC67 367F 40E2 0DD5 0FEF C968 D0EF CC68 D17F All your domain are belong to us. It is the mind that moves -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard iD8DBQE/dP/NyWjQ78xo0X8RAp7/AJ9SG2CDcRPwpubcnkHCYw6UpbfY7wCfe0ih MMUEikdOJ8jMjKEUTDX/X5g= =PjFn -----END PGP SIGNATURE-----