X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B35043A58AF for ; Tue, 25 Jan 2005 21:09:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20218-06 for ; Tue, 25 Jan 2005 21:09:09 +0000 (GMT) Received: from mail.coretech.co.nz (coretech.co.nz [202.36.204.41]) by svr1.postgresql.org (Postfix) with ESMTP id 6DD3C3A5876 for ; Tue, 25 Jan 2005 21:09:09 +0000 (GMT) Received: (qmail 26196 invoked from network); 25 Jan 2005 21:08:59 -0000 Received: from unknown (HELO ?10.0.10.28?) (10.0.10.28) by 0 with SMTP; 25 Jan 2005 21:08:59 -0000 Message-ID: <41F6B56A.9010103@coretech.co.nz> Date: Wed, 26 Jan 2005 10:08:58 +1300 From: Mark Kirkwood User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mitch Pirtle Cc: pgsql-performance@postgresql.org Subject: Re: PG versus FreeBSD, startup and connections problems References: <330532b605012510193eb73b72@mail.gmail.com> In-Reply-To: <330532b605012510193eb73b72@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.02 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/485 X-Sequence-Number: 10175 Mitch Pirtle wrote: >1) freebsd will only let PostgreSQL have 38 connections at a time, >regardless of kernel settings or postgresql.conf settings. Where >exactly (and how, exactly) does one remedy that problem? > > > What version of FreeBSD is the box running? Generally you need to change semaphores and shared memory settings, e.g. for 5.x or late 4.x : in /etc/sysctl.conf : kern.ipc.shmmax=100000000 kern.ipc.shmall=32768 (can be set online using systcl -w) Semaphores need to be set in /boot/loader.conf kern.ipc.semmni=256 kern.ipc.semmns=256 (can typed at the loader prompt using set) These settings should let you have ~100 connections and use about 100M of shared memory for shared_buffers. Early 4.x (I think) and before will need a kernel rebuild, see http://www.postgresql.org/docs/7.4/static/kernel-resources.html#SYSVIPC >2) As of this morning, the machine was down again, this time apache >fired up normally but pg refuses to start - without errors. When I >start with postmaster on the CLI I also get no errors, just no >postmaster. Why am I not seeing the errors, is this a FreeBSD or >PostgreSQL issue? > >For example: > >$ pg_ctl start >postmaster successfully started >$ pg_ctl status >pg_ctl: postmaster or postgres not running > >OR: > >$ postmaster -D /usr/local/pgsql/data >$ >(no response) > > > BTW - What version of Pg are you using? Check your postgresql.conf to see if all the output is going to syslog, e.g, syslog=2 If not, then unfortunately it is possible that whatever is causing the machine to be unstable has corrupted the data directory (so ...err... restore time). Starting the postmaster in debug mode will provide more output: $ postmaster -d 5 Additionally utilitites like 'strace' will give you a bit more info about where the startup process gets to. Do you know why the box went down? The freebsd-bugs or freebsd-stable list will help with respect to Freebsd crashing, see http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/eresources.html#ERESOURCES-MAIL regards Mark