Thread: Sorry, too many clients already
Hi All, We are getting an error every now and then in PostgreSQL saying 'Sorry, too many clients already'. We have recently installed the database version 7.0.3. Calls to database are made from our application written in Java, JSP. Can anyone help me with this? Thanks, Subra _________________________________________________________________________ __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
By default, one postmaster allows 32 clients to connect at same time, max is 1024. 1. check your processes under the postgres, kill the junky proccesses. 2. re_start your postmaster with -N=?? (>32) see your man page of postmaster. Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 jliang@ipinc.com www.stbernard.com www.ipinc.com On Fri, 23 Mar 2001, Subra Radhakrishnan wrote: > Hi All, > > We are getting an error every now and then in > PostgreSQL saying 'Sorry, too many > clients already'. We have recently installed the > database version 7.0.3. Calls to > database are made from our application written in > Java, JSP. Can anyone help > me with this? > > Thanks, > > Subra > _________________________________________________________________________ > > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster >
Use these commands : ps -ef|grep post kill -9 [process id] Mahesh Guleria -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Subra Radhakrishnan Sent: Friday, March 23, 2001 4:31 PM To: pgsql-admin@postgresql.org Subject: [ADMIN] Sorry, too many clients already Hi All, We are getting an error every now and then in PostgreSQL saying 'Sorry, too many clients already'. We have recently installed the database version 7.0.3. Calls to database are made from our application written in Java, JSP. Can anyone help me with this? Thanks, Subra _________________________________________________________________________ __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
Mahesh Guleria writes: > Use these commands : > > ps -ef|grep post > kill -9 [process id] Don't do that, it might destroy your database. SIGTERM should be used to kill individual backends. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
On Mon, Mar 26, 2001 at 12:00:03PM +0530, Mahesh Guleria wrote: > Use these commands : > > ps -ef|grep post > kill -9 [process id] No, no, a thousand times, no! Haven't you seen this appended to messages on the lists? ----- TIP 4: Don't 'kill -9' the postmaster ----- If you kill -9 the postmaster, various shared memory structures never get cleaned up correctly, so you risk damaging the database. What Subra is experiencing is the maximum simultaneous client limit, which defaults to 32 7.X series (it was 64 in 6.X). You can affect this with the -N parameter to postmaster, when it starts up. If you increase it, you may need to increase -B (shared buffers), as well. Check the pg_ctl man page. Each installation uses a slightly different way to startup the postmaster, so you'll have to track that down yourself. Ross > > Mahesh Guleria > > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Subra > Radhakrishnan > Sent: Friday, March 23, 2001 4:31 PM > To: pgsql-admin@postgresql.org > Subject: [ADMIN] Sorry, too many clients already > > > Hi All, > > We are getting an error every now and then in > PostgreSQL saying 'Sorry, too many > clients already'. We have recently installed the > database version 7.0.3. Calls to > database are made from our application written in > Java, JSP. Can anyone help > me with this? > > Thanks, > > Subra > _________________________________________________________________________ > > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
At 19.42 26/3/01 +0200, you wrote: >Mahesh Guleria writes: > > > Use these commands : > > > > ps -ef|grep post > > kill -9 [process id] > >Don't do that, it might destroy your database. SIGTERM should be used to >kill individual backends. > >-- >Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/ > You can do it like this: killall -TERM postmaster or kill -TERM `pidof postmaster` The SIGTERM signal can be trapped by a process and when is invoked the process can close all the opened resources like files and pipes. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ David Lizano - Director área técnica correo-e: david.lizano@izanet.com I Z A N E T - Servicios integrales de internet. web: http://www.izanet.com/ Dirección: C/ Checa, 57-59, 3º D - 50.007 Zaragoza (España) Teléfono: +34 976 25 80 23 Fax: +34 976 25 80 24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Ross J. Reedstrom" <reedstrm@rice.edu> writes: > On Mon, Mar 26, 2001 at 12:00:03PM +0530, Mahesh Guleria wrote: >> Use these commands : >> >> ps -ef|grep post >> kill -9 [process id] > No, no, a thousand times, no! Haven't you seen this appended to > messages on the lists? > TIP 4: Don't 'kill -9' the postmaster Actually, as of 7.1RC1 that issue is gone away; it's still not considered good practice to kill -9 any postgres process, but at least you can't shoot yourself in the foot that way anymore. regards, tom lane
Thanks everybody, Majority of the mails I received asked me to start the postmaster as follows and it seems to work so far: /usr/local/pgsql/postmaster -i -B 256 -N 128 -D /usr/local/pgsql/data/ Thanks again, Subra __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/