X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AA21B8B9E38 for ; Tue, 1 Feb 2005 08:38:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31698-05 for ; Tue, 1 Feb 2005 08:38:14 +0000 (GMT) Received: from pw6tiger.de (pw6tiger.de [217.160.140.116]) by svr1.postgresql.org (Postfix) with SMTP id 052CE8B9E43 for ; Tue, 1 Feb 2005 08:38:13 +0000 (GMT) Received: (qmail 31858 invoked by uid 505); 1 Feb 2005 08:38:12 -0000 Received: from vygen@gmx.de by planwerk6 by uid 89 with qmail-scanner-1.14 (virus scan: Clear:. Processed in 0.156698 secs); 01 Feb 2005 08:38:12 -0000 Received: from isi-dsl-126-109.isionline-dialin.de (HELO jv.pw6.de) (vygen@planwerk6.de@213.128.126.109) by pw6tiger.de with SMTP; 1 Feb 2005 08:38:12 -0000 From: Janning Vygen Organization: PLANWERK 6 To: pgsql-php@postgresql.org Subject: How to handle missing pgsql.connect_timeout Date: Tue, 1 Feb 2005 09:38:17 +0100 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502010938.17853.vygen@gmx.de> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.025 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/1 X-Sequence-Number: 2975 Hi, i use persitent connections and limit them for example to pgsql.max_persistent = 32 if all connections are in use a new http call to my script's pg_pconnect results in waiting for a free slot. That's fine, because usually a slot is getting free within a second. But if my server is much more overloaded and it would take more than 5 seconds to wait for a free slot it doesnt make sense to wait, because the user would hit stop anyway without getting a serious error message. it would be nice to have a timeout value after which pg_pconnect returns with an error, so could show a nice error page telling the user to try again in a few minutes. i found the php directive mysql.connect_timeout which does exactly what i want. There is no such directive for pgsql. I tried pgpool searching in pgpool for a connection timeout directive, but i didn't found one. It would be so nice to have a timeout of 3 seconds and after it display an error message to the user instead of let him waiting and waiting. Does anybody has any hints to solve this problem? kind regards janning