0

Who maintains persistent connections pool?

I've looked a bit at the source code and I understood that mysql_pconnect is a PHP made function and PHP itself is maintaining a pool of connections. It's not mysql's built in functionality and PHP only is responsible for maintaining a pool. Which seems legit.
Am I right ?

Slow queries killer?

I'm experiencing some problems with timed out connections.
My my.cnf has a configuration of wait_timeout=5. This is theoretically meant to kill queries that take more then 5 seconds to execute.

With this configuration I feel like I'm not achieving neither the 5 seconds limit per query, nor any benefits from persistent connections.

Could you validate my thoughts and suggest something?
php 5.3.3, mysql 5.1 via mysql ext, no mysqlnd

4

1 回答 1

1

wait_timeout should only kill idle connections.

To kill long running queries, you'll have to look into an external script.

The percona toolkit does have a tool that fits with what you want to do: pt-kill

于 2012-12-24T17:47:10.077 回答