PHP MySQL set Connection Timeout

The connect_timeout parameter is only valid at connection time. It’s useful to check if your DB server is reachable in 20 seconds or so. Once connected the specified timeout is no longer valid.

I don’t find any query timeout parameter on official mysql manual page: http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html so I don’t think this is possibile.

Leave a Comment