Re: Connection pooling in PHP?



howachen@xxxxxxxxx wrote:
Hi,

Is that when using pconnect to mysql, it is already mean connection
pooling?

thanks.


No. mysql_pconnect() is a persistent connection. These connections
will be around as long as your web server is running and can be reused
by different scripts. The number of connections is fixed.

Pooling allows connections to be reused also. But the difference is
smart pooling will dynamically adjust the size of the pool. For
instance, if a connect request is issued and there is a free connection,
that one is used. If none are free, a new one is acquired.

When a the application closes a connection, the connection isn't
released immediately. Instead, it can hang around for a while.
Eventually unused connections will be released.

Of course, this assumes one server and one userid/password. It's a
little more complex if you use more than one server and/or
userid/password, but the concept is the same.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: Random database connectivity failure
    ... We can’t find any problems with the pooling, that it uses to many resources. ... pointing to its not a pool problem. ... The server is only used for this web-application, ... white paper on handling the connection pool on my website. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ODBC/OLE DB Connection Pool
    ... the article on MS support site ... IIS server around 200 or at most 2000 fail with the "server not found" ... Connection Pool (I have already completed the TCP/IP tasks without ... it means that connection pooling is not working. ...
    (microsoft.public.data.ado)
  • Re: ODBC/OLE DB Connection Pool
    ... the article on MS support site ... IIS server around 200 or at most 2000 fail with the "server not found" ... Connection Pool (I have already completed the TCP/IP tasks without ... it means that connection pooling is not working. ...
    (microsoft.public.inetserver.asp.db)
  • Re: ODBC/OLE DB Connection Pool
    ... the article on MS support site ... IIS server around 200 or at most 2000 fail with the "server not found" ... Connection Pool (I have already completed the TCP/IP tasks without ... it means that connection pooling is not working. ...
    (microsoft.public.data.oledb)
  • Re: ODBC/OLE DB Connection Pool
    ... > Connection Pool (I have already completed the TCP/IP tasks without ... turning off pooling is the errors you are seeing. ... problems are occurring with SQL Server; for example, ... ASP developers should open one connection per set of unique user ...
    (microsoft.public.data.ado)