For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > April 2004 > a few questions concerning mysql_pconnect









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author a few questions concerning mysql_pconnect
davidklonski

2004-04-20, 8:30 pm

Hello

I have been reading about mysql_pconnect (persistent connections) and
I am a bit from the problems they seem to cause people.

Here is what I understand:
If I use mysql_pconnect instead of mysql_connect, then used
connections from the same host, username & password will not be
thrown away after the child process of the web server (I am using
Apache) is done with them. They will persist for a whlie before
being garbaged.
This allows the child process to continue using the same connection if
another request is made to the same host, username & password and
the connection was still alive.

I understand that many people are complaining that the number of
persistent connections keep getting larger and larger.
This is because the Web server spawns many child processes and each
has its own connection.

Here is my question:
I all of the connections will be made to the same, username &
password, can that problem still occur?

I also understand that MySQL can limit the number of open connections.
Is there a way to tell it not to limit it and what the cosequences
of that would be?

thanks in advance



----------------------------------------
The post originated from PHP Freaks:
----------------------------------------
http://www.phpfreaks.com
http://www.phpfreaks.com/forums


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com