Reputation: 5332
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
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