Stillmatic1985
Stillmatic1985

Reputation: 1912

Increasing mysql connections

We got a big problem with our mysql server setup. We use Zend Framework 2 with Doctrine 2 and PDO Mysql connection. Our problem is, that the connections shown with mysql > show status are increasing and increasing. It seems like this behavior is slowing our whole application. At the moment the connection count is about 150000. 5 hours before it was about 2000.

We activated persistant connections in php.ini and on the pdo connection. => No change

Can this behavior slow down our whole system or is this normal?

What could be the problem?

Thanks for help

Upvotes: 0

Views: 673

Answers (2)

cOle2
cOle2

Reputation: 4784

If your server gets bogged down with only 5 active mysql connections I'd suggest you add some timing code to your app to try and pinpoint where the slowdown is. Common reasons could be un-optimized queries, un-optimized mysql, or running queries in loops unnecessarily to name a few.

Upvotes: 0

Tim Fountain
Tim Fountain

Reputation: 33148

The 'connections' figure shown on SHOW STATUS is the total number of connection attempts made since the server was started (see: http://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html#statvar_Connections). It's perfectly normal for this number to keep increasing, and it's highly unlikely this is slowing down your application.

If your application is running slowly you should benchmark it to try see where the bottleneck is.

Upvotes: 1

Related Questions