Page 1 of 1

Persistent connection

Posted: Tue Dec 26, 2006 1:53 pm
by amir
Hello,

My php.info displays:

Code: Select all

mysql.allow_persistent     On     On
mysql.connect_timeout     -1     -1
mysql.max_persistent  Unlimited   Unlimited
Is this setting ok to be using persistent connection? If it doesnt timeout and there is no max limit, is it safe or can it bring down the server ?

Please advise on what the settings should be. I am on my own server.

TIA!

Posted: Tue Dec 26, 2006 2:40 pm
by RobertGonzalez
I think persistent connections will cause issues mainly when your script execution halts before closing the connection as I believe it leaves an open connection to the server. I think.

Posted: Tue Dec 26, 2006 2:42 pm
by Chris Corbyn
I think this only applies to mysql_pconnect(). I didn't check that in the manual though.

Posted: Tue Dec 26, 2006 2:52 pm
by volka