Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2007 14:54:46 +0000
From:      bob.middaugh@comcast.net (Bob Middaugh)
To:        freebsd-questions@freebsd.org 
Subject:   Kernel options for increasing connections/shared buffers in Postgres
Message-ID:  <081720071454.5487.46C5B6B60001B6580000156F220076143808099A0E0B0B0703D20D010D@comcast.net>

next in thread | raw e-mail | index | archive | help
Hi everyone,
I'm running OpenNMS on 6.2-Release, and I get this error message when it, I think, tries to hit the postgres DB:

FATAL: "Too many clients"

My guess is I'm getting this because I can't increase max connections and shared buffers in postgresql.conf because I haven't added the kernel options they want, yet.  I've never used Postgres before and my exposure to DB's in general is minimal.  I read somewhere, I forget now, that in order to increase max connections and shared buffers in postgresql.conf, you're supposed to have the following options with these values in your kernel: 
SHMMAXPGS=65536
SEMMNI=40
SEMMNS=240
SEMUME=40
SEMMNU=120

It seems most of the docs for OpenNMS relate to linux or solaris.  Are these values ok for FreeBSD?  

I notice in LINT there are more options:
SEMMAP=31
SEMMSL=61
SEMOPM=101
SHMALL=1025
SHMMAX=(SHMMAXPGS *PAGE_SIZE+1)
SHMMIN=2
SHMMNI=33
SHMSEG=9

I google them, but I'm not real sure what it all means when they're used in conjunction with one another.  Should I be using any of them?  If so, what value, since I'm not using the defaults for the one's postgres wants compiled in.

Before I do this, I wanted to see if this was ok.  This box has 512MB RAM, 1GB swap file and it won't be doing anything other than running postgres server8.1, tomcat 4.1 and opennms 1.2.9.

Thanks,
Bob



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?081720071454.5487.46C5B6B60001B6580000156F220076143808099A0E0B0B0703D20D010D>