[FASTCGI] PHP FastCGI mysql_pconnect
simon at optinet.com
Fri Apr 3 08:16:50 EDT 2009
Thanks! I will test it again. I'm not using it, I'm just the admin. Just wanted to
double check because for some reason I remember testing it and it wouldn't
work before. I always tell users not to use it not to tie up MySQL connections,
but they still do and sometimes run into issues. On the other hand, can you
tell me why you believe it's a bad idea to use pconnect to begin with?
On Fri, 3 Apr 2009 14:10:49 +0200, Rasmus Andersson wrote:
>On Fri, Apr 3, 2009 at 00:36, Simon <simon at optinet.com> wrote:
>> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FastCGI-developers