X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 70F039F96B6 for ; Wed, 3 May 2006 11:58:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 56752-07 for ; Wed, 3 May 2006 11:58:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id E6B9A9F9C9E for ; Wed, 3 May 2006 11:58:11 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Wed, 3 May 2006 14:58:09 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 03 May 2006 09:58:09 -0500 Subject: Re: Trouble with phpbb installation From: Scott Marlowe To: Federico Campoli Cc: pgsql-admin@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1146668289.22037.31.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 03 May 2006 09:58:09 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/27 X-Sequence-Number: 21559 On Mon, 2006-05-01 at 18:20, Federico Campoli wrote: > Hi. > > Yesterday I've migrated a PHPBB mysql database on a fresh install of > postgresql 8.1.3 on a debian gnu/linux sarge 3.1. > > The python script that migrate schema and data worked fine and I got > all data on the my postgresql database. > > But, when the number of phpbb connected users increase (about 70-80), > postgresql go crazy. > > The number of postgres process increase too and not decrease when the > php pages released the connection (I use not persistent connection on > my php cofiguration). This actually usually points to a problem in your web server with crashing processes leaving postgresql children up not disconnecting properly. A quick fix is to set a REALLY low tcp_keepalive in the networking on those machines, assuming you're using tcp/ip sockets to connect. not sure how to recover broken connections on local unix sockets. > Changing the database parameter like checkpoint_timeout, write_mode > and shared_buffer has no effect on this strange situation. > > I've noticed also that when the connected user increase after 70 the > data are not commited immediately. This is likely because those broken connections I mentioned above are standing in the way of the actual, live connections. Run top on the machine while this is happening and look for zombie processes and such. Note that the most common cause of a crashing apache is having modules compile against one set of libs and apache compile against another. How was your php server built? what version php is it, all that kind of stuff might help us figure this out.