Re: PHP FastCGI mysql_pconnect

Rasmus Andersson <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
On Fri, Apr 3, 2009 at 00:36, Simon <[email protected]> wrote:
> Hello,
>
> Does anyone know if PHP under FastCGI can keep persistent connection to
> MySQL via mysql_pconnect. I believe the last time I tried this, it wouldn't work.

Yes it can and should. But keep in mind PHP leaks like a broken
umbrella so normally each PHP process is restarted every N requests,
thus dropping any connections. (N is normally 10000 or something).

Even though this really is out of topic for this list :)

Quick question and tip: Why are you using pconnect? It's almost always
a bad idea. Setting up a TCP connection on an internal network is
really cheap in comparison to connecting to other networks. If you are
connecting to an outside network, connection latency might become a
problem and then pconnect is there to ease the pain.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.