Not closing connections?
-
On one of the sites I run, a colleague installed WP Zombaio. Whether it is merely coincidental or not we are trying to discover but we began to experience random d/b connection errors immediately after.
On trying to repair/rebuild the d/b, we got:
“User Uxxxxx already has more than ‘max_user_connections’ active connections”
Tech support replied:
“The error that occurred happens when an account on the server is opening to many connections to mysql on the server This happens sometimes with poorly written code that leaves connections open and keeps opening more connections. When one account does this it effects the entire mysql server resulting in the error you received and is only fixed when we find the issue and stop those lingering connections.
When you tell your website to do anything with the database, remember to then CLOSE the connection. You are on SHARED hosting, so if your database is holding open half the doors – other users will suffer.
mysql_close();
Very easy to add at the end of pages with SQL commands!
Max connections allowed at a time per database: 20 connections”
Is this related to WP Zombaio? As you will appreciate, previous experience with WordPress/Zombaio integration leads me to look here first.
Pending a reply, we have deactivated WP Zombaio to see if this does indeed cure the problem.
- The topic ‘Not closing connections?’ is closed to new replies.