Received: from grumpy.usu.edu (grumpy.usu.edu [129.123.1.86]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eAMFlYs79663 for ; Wed, 22 Nov 2000 10:47:35 -0500 (EST) (envelope-from rmello@cc.usu.edu) Received: from cc.usu.edu ("port 1998"@slxwy.dorms.usu.edu [129.123.236.160]) by cc.usu.edu (PMDF V5.2-32 #30472) with ESMTP id <01JWU28XKLYA8ZEQTS@cc.usu.edu> for pgsql-sql@postgresql.org; Wed, 22 Nov 2000 08:45:19 MDT Date: Wed, 22 Nov 2000 08:46:30 -0700 From: Roberto Mello Subject: Re: Persistent Connects (pg_pconnect) To: Itai Zukerman Cc: Colleen Williams , pgsql-sql@postgresql.org Message-id: <3A1BEA56.E41C7704@cc.usu.edu> MIME-version: 1.0 X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16 i586) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en, pt-BR References: <4.3.2.7.2.20001121122024.00b41aa8@192.168.1.253> <87d7foocu7.fsf@matt.w80.math-hat.com> X-Archive-Number: 200011/184 X-Sequence-Number: 215 Itai Zukerman wrote: > > Not sure if this is related, but under the non-threading Apache > server, you get 1 persistent connection per Apache process. I don't > think you can be sure which process gets the page with the connection > request, so if you have a limit of, say, 50 processes, and your server > is hit fairly often, eventually you'll see 50 connections even though > only a few simultaneous accesses to PHP/PostgreSQL are made. One way to work this out is to use a webserver that is fully multithreaded, with pooled connections to the database that can be shared among threads as needed. This yields much superior performance and saves a ton of resources. One example of such type of webserver that has been fully multithreaded and under heavy use since 1995, and has a PHP4 module is AOLserver, that powers mighty aol.com and digitalcity.com (with mere 32 K hits per second). AOLserver also has a built-in database abstraction layer and Tcl interpreter (with the option of caching compiled code of scripts), and a comprehensive API for building massively scalable dynamic websites. More info at http://www.aolserver.com -Roberto -- Computer Science Utah State University Space Dynamics Laboratory Web Developer USU Free Software & GNU/Linux Club http://fslc.usu.edu My home page - http://www.brasileiro.net/roberto