mysql.connect_timeout default

php.internals

Brian Moon

18 years ago
I would like to propose we set this default value to something more appropriate for a web app. It is currently 60 seconds. That is a really long time for a web page to wait to find a mysql server, IMO. And in the spirit of PHP being web first, I think it should be shorter. The place where this is an issue is when the server is down completely. This bit me in the butt today. If the server is up, but mysqld is not, PHP will disconnect immediately. But if there is no server answering on that IP address, PHP will wait `mysql.connection_timeout` seconds before telling you it could not connect to the server. FWIW, the default for MySQL server is 10 seconds (increased from 5 last fall) for a connection timeout. I personally like 5 seconds for the default unless someone knows a reason this is a bad idea. Is there some other internal trigger to the connection that could cause this to be hit at 5 seconds? Other thoughts?
-- Brian Moon Senior Developer ------------------------------ When you care enough to spend the very least. http://dealnews.com/