pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris <dmagick@gmail.com>
To: thomas.pundt@rp-online.de
Cc: firerox@centrum.cz
Cc: pgsql-performance@postgresql.org
Subject: Re: slow pg_connect()
Date: Tue, 25 Mar 2008 15:18:00 +1100
Message-ID: <47E87CF8.9020407@gmail.com> (raw)
In-Reply-To: <47E7A10F.5060805@rp-online.de>
References: <200803240840.8128@centrum.cz>
	<47E7A10F.5060805@rp-online.de>


> * Read about configuring and using persistent database connections
>   (http://www.php.net/manual/en/function.pg-pconnect.php) with PHP

Though make sure you understand the ramifications of using persistent 
connections. You can quickly exhaust your connections by using this and 
also cause other issues for your server.

If you do this you'll probably have to adjust postgres to allow more 
connections, which usually means lowering the amount of shared memory 
each connection can use which can also cause performance issues.

I'd probably use pgpool-II and have it handle the connection stuff for 
you rather than doing it through php.

-- 
Postgresql & php tutorials
http://www.designmagick.com/



view thread (7+ messages)

Message-ID: <47E87CF8.9020407@gmail.com>
Permalink:  ../47E87CF8.9020407@gmail.com/
Also on:    postgresql.org/message-id/47E87CF8.9020407@gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dmagick@gmail.com, thomas.pundt@rp-online.de, firerox@centrum.cz
  Subject: Re: slow pg_connect()
  In-Reply-To: <47E87CF8.9020407@gmail.com>

* 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