maximkou
maximkou

Reputation: 5332

Mysql: Too many connections to database

recently encountered such a problem, mysql permanently crash with error "Too many connections".

Connections limit was increased(350 connections), but this not help for me. I am use PDO with persistent connection, but still open for new connections.

In what could be the problem? Thanks.

Upvotes: 0

Views: 264

Answers (1)

Your Common Sense
Your Common Sense

Reputation: 157839

Judging by code I've seen in other questions under pdo tag, most likely you are opening new connection for the every query. So, persistent connection makes it even worse.

Create only one single connection and use it throughout whole app, and error will be gone.

Upvotes: 2

Related Questions