note 15405 deleted from function.mysql-pconnect by jimw

From: Date: Fri, 07 Dec 2001 01:47:03 +0000
Subject: note 15405 deleted from function.mysql-pconnect by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21783@lists.php.net to get a copy of this message
I had big problems with pconnect. first I host a few homepages with lots of database content... every homepage has his own database. e.g. homepage A has 100 visitors at this time and homepage B has 150 visitors.... and both homepages are using pconnect. this will do 100 pconnects for Homepage A because they are all at the same time so it wont use a child that has already a request, and it will use 150 pconnects for homepage B; this makes 250 connects at one time.... so now are 250 childs on apache with pconnects... this gets even worther when the childs from homepage A are free and a visitor of homepage B get one of those free homepage A childs... that means that child will have a pconnect to the database for homepage A _and_ B.... so after some time it will have a total of 500 pconnects! I had that... man my server was stuck with a load of 8 and the memory was full.... after changing to mysql_connect, everything went fine... btw for those admins just dont allow pconnects in php.ini, it will make your life easier :))

« previous php.notes (#21783) next »