php's pconnect opens a connection for every process that accesses the
database. The webserver processes don't share the connections, but later
accesses on the same process re-use the previous connection. It's very
likely that when you hit your php script, you're going to get a different
webserver process with no persistent connection the first several times.
After a while, your connections will level out, but they may (probably will)
go as high as the number of webserver processes that are running. That's one
major drawback to php's pconnect.

--jeff

----- Original Message -----
From: "Ê© Á¢²¨" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 28, 2002 8:09 PM
Subject: mysql_pconnect doesn't work in php


> i use mysql_pconnect in php, but after call
> mysql_pconnect every time,i find that connection
> increase one.it says in php manual, mysql_pconnect
> will first try to find a (persistent) link that's
> already open with the same host, username and
> password. If one is found, an identifier for it will
> be returned instead of opening a new connection.
>
> but why open a new connection every time in my
> program?
>
>
> reebes
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to