#20237 [Bgs]: pg_pconnect, too many connections
| From: | anders at gatefive dot fi | Date: | Mon, 04 Nov 2002 14:01:32 +0000 |
| Subject: | #20237 [Bgs]: pg_pconnect, too many connections | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24042@lists.php.net to get a copy of this message | ||
ID: 20237
User updated by: anders@gatefive.fi
Reported By: anders@gatefive.fi
Status: Bogus
Bug Type: PostgreSQL related
Operating System: linux
PHP Version: 4.2.3
New Comment:
That i did know, but as I mentioned, the connections are being made by
only 1 user, so it therefore seems as if there would be something funny
going on..
That would lead us to a max of 150 connections - even 600 wasn't
enough..
Previous Comments:
------------------------------------------------------------------------
[2002-11-04 07:49:03] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
When using persistant connections each Apache child eventually will
have an open connection. Now, if have many users, then this translates
to connection per user per apache child. So, with 20 different users
connecting to PostgreSQL and 100 Apache children, you could see as many
as 2000 open connections.
------------------------------------------------------------------------
[2002-11-04 02:56:50] anders@gatefive.fi
I am not sure if this is a pgsql-extension bug or merely an
documentation bug. I have had problems with a webserver, getting
php-error saying too many connections, when using persistent
connections.
It seems mysql behaves like:
(apache) MaxClients * persistant-connections
whereas this is in postgres more like:
MaxClients * DBs * users * persistant connections (not mentioned
anywhere in docs).
OR php have troubles finding allready opened connections in its
hashtable. (PHP 4.2.3, postgres 7.1.3)
It seems strange to have different pconnects to same postgres backend
if different databases (seems the source selects DB on the open
connection anyhow).
background: apache maxclients = 150, 1 user a few DBs and postgress
max_connections limit set to 600 ! and it wasn't enough. (fix: changed
everything from pg_pconnect to pg_connect).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20237&edit=1