From: Sean Chittenden <sean@chittenden.org>
To: Simeó Reig <simeo@incofisa.com>
Cc: Babak Badaei <babak@hemaka.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: max_connections limit
Date: Mon, 17 Mar 2003 15:26:40 -0800
Message-ID: <20030317232640.GV23355@perrin.int.nxad.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0303180028280.27172-100000@mail.incofisa.com>
References: <20030317214830.GN23355@perrin.int.nxad.com>
<Pine.LNX.4.33.0303180028280.27172-100000@mail.incofisa.com>
> > > I have a server running FreeBSD 4.7 and postgres 7.2.4 and when I
> > > set "max_connections" to a value greater than 47, I am unable to
> > > connect to the database server. I need to be able to raise this
> > > number much higher because every site on this server runs postgres
> > > and at peak times this limit is reached and causes problems. The
> > > server has 2 gigs of memory. I would appreciate any suggestion.
> >
> > What's the output in /var/log/pgsql ? -sc
>
> I have a freeBSD with postgres too and I believe I had to tune the
> kernel for this question
That's what I was getting at actually. When you install PostgreSQL
via the ports, a file is both sent to the user for visual review, as
well being copied to a file:
/usr/local/pgsql/post-install-notes
Please review this and see if this doesn't solve your problem.
FreeBSDs SHM settings are low by default and need to be increased for
any kind of production use.
### Begin
To allow many simultaneous connections to your PostgreSQL server, you
should raise the SystemV shared memory limits in your kernel. Here are
example values for allowing up to 180 clients (tinkering in
postgresql.conf also needed, of course):
options SYSVSHM
options SYSVSEM
options SYSVMSG
options SHMMAXPGS=65536
options SEMMNI=40
options SEMMNS=240
options SEMUME=40
options SEMMNU=120
### End
Please let me know if anyone thinks these numbers should be revised or
could be broken down into a formula for calculation and I'll
incorporate them. -sc
--
Sean Chittenden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: sean@chittenden.org, simeo@incofisa.com, babak@hemaka.com
Subject: Re: max_connections limit
In-Reply-To: <20030317232640.GV23355@perrin.int.nxad.com>
References: <20030317214830.GN23355@perrin.int.nxad.com> <Pine.LNX.4.33.0303180028280.27172-100000@mail.incofisa.com> <20030317232640.GV23355@perrin.int.nxad.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox