Thread: Problem with postgreSQL (number of backends)

Problem with postgreSQL (number of backends)

From
borchert@antsatwork.de (Konstantin Borchert)
Date:
Hi,

i have problems with PostgreSQL 7.0.3 on a RedHat 6.2 System. Very often
postgresql post me the following warning and error message.


Warning: Unable to connect to PostgreSQL server: Sorry, too many clients
already in /home/server/...
PostgreSQL said: Unable to connect to server


It seems to be a problem with buffers and backends. So i have restart the
postmaster with the parameters "/usr/bin/postmaster -N 256 -B 512 " ... (i
put these parameters in the file "postmaster.opts" in the postgresql data
folder).But it seems to have no effect. The problem still exist.

I need help

thx


Konstantin

Re: Problem with postgreSQL (number of backends)

From
"Richard Huxton"
Date:
Konstantin Borchert <borchert@antsatwork.de> said:

> Hi,
>
> i have problems with PostgreSQL 7.0.3 on a RedHat 6.2 System. Very often
> postgresql post me the following warning and error message.
>
>
> Warning: Unable to connect to PostgreSQL server: Sorry, too many clients
> already in /home/server/...
> PostgreSQL said: Unable to connect to server
>
>
> It seems to be a problem with buffers and backends. So i have restart the
> postmaster with the parameters "/usr/bin/postmaster -N 256 -B 512 " ... (i
> put these parameters in the file "postmaster.opts" in the postgresql data
> folder).But it seems to have no effect. The problem still exist.

How many clients do you have when this happens?
How much RAM have you got?
Did you alter the max_connections setting at install time?

- Richard Huxton

Re: Problem with postgreSQL (number of backends)

From
borchert@antsatwork.de (Konstantin Borchert)
Date:
dev@archonet.com ("Richard Huxton") wrote in
<20010424190204.84D6D2A3AB@mainbox.archonet.com>:

>Konstantin Borchert <borchert@antsatwork.de> said:
>
>> Hi,
>>
>> i have problems with PostgreSQL 7.0.3 on a RedHat 6.2 System. Very
>> often postgresql post me the following warning and error message.
>>
>>
>> Warning: Unable to connect to PostgreSQL server: Sorry, too many
>> clients already in /home/server/...
>> PostgreSQL said: Unable to connect to server
>>
>>
>> It seems to be a problem with buffers and backends. So i have restart
>> the postmaster with the parameters "/usr/bin/postmaster -N 256 -B 512
>> " ... (i put these parameters in the file "postmaster.opts" in the
>> postgresql data folder).But it seems to have no effect. The problem
>> still exist.
>
>How many clients do you have when this happens?

no more than 32 clients

>How much RAM have you got?

the server has 256 MB RAM

>Did you alter the max_connections setting at install time?

no, i use the default values
it's possible to change the value of max_connections??


>
>- Richard Huxton
>

Re: Re: Problem with postgreSQL (number of backends)

From
"John Clark L. Naldoza"
Date:
Konstantin Borchert wrote:
>
> dev@archonet.com ("Richard Huxton") wrote in
> <20010424190204.84D6D2A3AB@mainbox.archonet.com>:
>
> >Konstantin Borchert <borchert@antsatwork.de> said:
> >
> >> Hi,
> >>
> >> i have problems with PostgreSQL 7.0.3 on a RedHat 6.2 System. Very
> >> often postgresql post me the following warning and error message.
> >>
> >>
> >> Warning: Unable to connect to PostgreSQL server: Sorry, too many
> >> clients already in /home/server/...
> >> PostgreSQL said: Unable to connect to server
> >>
> >>
> >> It seems to be a problem with buffers and backends. So i have restart
> >> the postmaster with the parameters "/usr/bin/postmaster -N 256 -B 512
> >> " ... (i put these parameters in the file "postmaster.opts" in the
> >> postgresql data folder).But it seems to have no effect. The problem
> >> still exist.
> >
> >How many clients do you have when this happens?
>
> no more than 32 clients
>
> >How much RAM have you got?
>
> the server has 256 MB RAM
>
> >Did you alter the max_connections setting at install time?
>
> no, i use the default values
> it's possible to change the value of max_connections??


Why not try to edit the

/var/lib/pgsql/data/postmaster.opts.default

file

and place this inside..;-)

-i -N 256 -B 4096 -o "-S 4096 -F"

run the following:

echo 16384 > /proc/sys/fs/file-max
echo 134217728 > /proc/sys/kernel/shmmax

and restart your database server...

/etc/rc.d/init.d/postgresql restart

That should make your box a little happy...;-)


--
     /) John Clark Naldoza y Lopez                           (\
    / )    Software Design Engineer II                       ( \
  _( (_    _  Web-Application Development                    _) )_
 (((\ \>  /_>    Cable Modem Network Management System <_\  </ /)))
 (\\\\ \_/ /         NEC Telecom Software Phils., Inc.  \ \_/ ////)
  \       /                                              \       /
   \    _/  phone: (+63 32) 233-9142 loc. 3112            \_    /
   /   /  cellphone: (+63 919) 399-4742                     \   \
  /   / email: njclark@ntsp.nec.co.jp                        \   \

Re: Problem with postgreSQL (number of backends)

From
Charles Tassell
Date:
 From my understanding, postmaster.opts just tells you what the config
parameters are for the running database, and it's over-written upon each
restart of postmaster.  You'll want to add the options to the script that
actually starts Postgres.  On a RedHat system, take a look in
/etc/rc.d/init.d or /etc/init.d for a file called "postgres" and set the
OPTS line to "-N 256 -B 512".  IE
OPTS="-N 256 -B 512"

At 12:14 PM 4/24/01, Konstantin Borchert wrote:
>Hi,
>
>i have problems with PostgreSQL 7.0.3 on a RedHat 6.2 System. Very often
>postgresql post me the following warning and error message.
>
>
>Warning: Unable to connect to PostgreSQL server: Sorry, too many clients
>already in /home/server/...
>PostgreSQL said: Unable to connect to server
>
>
>It seems to be a problem with buffers and backends. So i have restart the
>postmaster with the parameters "/usr/bin/postmaster -N 256 -B 512 " ... (i
>put these parameters in the file "postmaster.opts" in the postgresql data
>folder).But it seems to have no effect. The problem still exist.
>
>I need help
>
>thx
>
>
>Konstantin
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly