pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Janning Vygen <vygen@gmx.de>
To: pgsql-php@postgresql.org
Subject: How to handle missing pgsql.connect_timeout
Date: Tue, 1 Feb 2005 09:38:17 +0100
Message-ID: <200502010938.17853.vygen@gmx.de> (raw)

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







view thread (8+ messages)  latest in thread

Message-ID: <200502010938.17853.vygen@gmx.de>
Permalink:  ../200502010938.17853.vygen@gmx.de/
Also on:    postgresql.org/message-id/200502010938.17853.vygen@gmx.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: vygen@gmx.de
  Subject: Re: How to handle missing pgsql.connect_timeout
  In-Reply-To: <200502010938.17853.vygen@gmx.de>
  References: <200502010938.17853.vygen@gmx.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox