MDT FATAL: sorry, too many clients already (Error de Postgres 9)

When-to-fire-a-client-mainTo increase the connection you may like the following document. This solution is tested on ubuntu 12.04.

1. Make following changes in postgresql.conf file :

open /etc/postgresql/9.1/main/postgresql.conf

max_connection=200
shared_buffers = 100MB
max_files_per_process = 100

link : (http://gabe.grayum.name/?p=postgres_max_connections_and_shared_buffers shared_buffers size should be less than shmmax size.)

2. Commands to check shmmax:

$ sysctl -e kernel.shmmax
$ ipcs -l

link : (http://serverfault.com/questions/341680/postgresql-performance-adjusting-shmmax-and-shmall)

3. Increase the size of shmmax: run the follwing command.

$ sysctl -w kernel.shmmax=134217728 
$ sysctl -w kernel.shmall=2097152

and write on top in /etc/sysctl.conf file:

kernel.shmmax=134217728
kernel.shmall=2097152

link : (http://www.linuxquestions.org/questions/linux-newbie-8/shmmax-in-ubuntu-860206/)

4. About:(links)

http://www.varlena.com/GeneralBits/Tidbits/perf.html

http://www.postgresql.org/docs/9.1/static/runtime-config-resource.html

5. restart postgresql

$ service postgresql restart

Thanks.

 

Referencia: http://stackoverflow.com/questions/9798705/arval-sqlexception-fatal-sorry-too-many-clients-already-in-postgres

También te podría gustar...

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *