From owner-freebsd-questions@FreeBSD.ORG Fri Aug 17 14:54:47 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA8F716A418 for ; Fri, 17 Aug 2007 14:54:47 +0000 (UTC) (envelope-from bob.middaugh@comcast.net) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.152]) by mx1.freebsd.org (Postfix) with ESMTP id DC38D13C4B3 for ; Fri, 17 Aug 2007 14:54:47 +0000 (UTC) (envelope-from bob.middaugh@comcast.net) Received: from rmailcenter09.comcast.net ([204.127.197.119]) by comcast.net (rwcrmhc12) with SMTP id <20070817145447m1200dif4qe>; Fri, 17 Aug 2007 14:54:47 +0000 Received: from [199.20.68.40] by rmailcenter09.comcast.net; Fri, 17 Aug 2007 14:54:46 +0000 From: bob.middaugh@comcast.net (Bob Middaugh) To: freebsd-questions@freebsd.org Date: Fri, 17 Aug 2007 14:54:46 +0000 Message-Id: <081720071454.5487.46C5B6B60001B6580000156F220076143808099A0E0B0B0703D20D010D@comcast.net> X-Mailer: AT&T Message Center Version 1 (Oct 4 2006) X-Authenticated-Sender: Ym9iLm1pZGRhdWdoQGNvbWNhc3QubmV0 Subject: Kernel options for increasing connections/shared buffers in Postgres X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2007 14:54:48 -0000 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