Dirigir a: Re: php4 / pgsql7 problem (too many clients) - Mailing list pgsql-php

From Rodrigo Fernandez
Subject Dirigir a: Re: php4 / pgsql7 problem (too many clients)
Date
Msg-id 200010301457.IAA89644@fisicc-ufm.edu
Whole thread Raw
List pgsql-php
> I recently started getting this message on a pgsql7 / php4 installation:
>
>
>  Warning: Unable to connect to PostgresSQL server: Sorry, too many clients
>  already in /usr/local/lib/php/phplib-7.2/php/db_pgsql.inc on line 40
>  Database error: Link-ID == false, pconnect failed
>  PostgreSQL Error: 0 ()
>  Session halted.
>
>  I\'ve been unable to locate the source of this error, or any pertinent
info
>  about the default number of client connections allowed, and/or how to
> change
>  it.
>
>  Can anyone point me in the right direction please ?
>
>
>

I had the same problem, I did 3 things to \"solve\" the problem:

1.- edit the php.ini to fine tune the numper of persistent connections.
   (note that this are persistent connections per script, it is not the
    global number of persistent connections for all scripts).

2.- get more memory for my computer (persistent connections tend to
    take a lot of memory).

3.- fine tune the \"MaxRequestsPerChild\" variable in the httpd.conf, which
    controls the number of request a httpd child will accept before y dies
    and takes all the persistent connections with it.  This will mantain
    a balance in the number of open persisten connections.

Hope to help you...

Rodrigo F.

-----------------------------------------------------
This mail sent through IMP: http://web.horde.org/imp/

pgsql-php by date:

Previous
From: Hervé Piedvache
Date:
Subject: Seg fault ...
Next
From: "Adam Lang"
Date:
Subject: Re: [INTERFACES] web interface php3 question.