Обсуждение: Maximum number of connections
Hello, we have just started using Postgres and now I'm receiving an error Backend start-up failed: FATAL: Sorry, too many clients already when trying to connec to our Postgres server through JDBC. How can I increase the number of possible clients (at this point there where 10 connections) without recompiling Postgres??? Any help appreciated! Cheers Thomas
Hi, On Thu, 24 Apr 2003, Thomas Kellerer wrote: > How can I increase the number of possible clients (at this point there > where 10 connections) without recompiling Postgres??? Edit $PGDATA/data/postgresql.conf and increase the max_connections parameter. Please do not forget that you must also increase shared_buffers parameter, as described in conf file. Regards, -- Devrim GUNDUZ devrim@gunduz.org devrim.gunduz@linux.org.tr http://www.gunduz.org
Thomas Kellerer schrieb: > Hello, > > we have just started using Postgres and now I'm receiving an error > > Backend start-up failed: FATAL: Sorry, too many clients already > > when trying to connec to our Postgres server through JDBC. > > How can I increase the number of possible clients (at this point there > where 10 connections) without recompiling Postgres??? > > Any help appreciated! > > Cheers > Thomas > Never mind, I found the answer. The only thing that puzzles me. The documentation says the default is 32, but at the time I received the error messages there were only about 10-12 clients connected. Is it possible that the default isn't 32? I have set the number to 64 now. As far as I can tell the only "drawback" when increasing this number, is that more memory is needed. Any other disadvantages? Cheers Thomas
At 04:03 PM 4/24/2003 +0200, Thomas Kellerer wrote: >Never mind, I found the answer. The only thing that puzzles me. The >documentation says the default is 32, but at the time I received the error >messages there were only about 10-12 clients connected. Is it possible >that the default isn't 32? Possible. But unlikely. More likely that something else is hogging the connections. Or the 10-12 clients are making more than one connection each. Do a ps or something to get a list of processes. >I have set the number to 64 now. As far as I can tell the only "drawback" >when increasing this number, is that more memory is needed. Any other >disadvantages? As long as you do have enough memory, it should be fine. Might be a good idea to have spare connection capacity - so that if your JDBC clients are maxed out, you can still connect and are not locked out. Hope that helps, Link.