Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
759 views
in Q2A Core by
My website has showed the max_user_connections error. I have talked to my website hosting provider they suggested that I should use mysql_close() command. there are many files written in php in the script in which file and where I have to put mysql_close() How I can use mysql_close()?

Where I have to put it?

1 Answer

+1 vote
by

At first, MySQL connection is automatically closed.

  1. Error occurs frequently?
  2. What is QA_PERSISTENT_CONN_DB in your qa-config.php?
  3. Do you have permission to alter basic configuration of MySQL?
by
1.
 A___
Your Question2Answer database has been checked with no problems. Go to admin center
B___ Could not establish database connection. Please check the username, password and hostname in the config file, and if necessary set up the appropriate MySQL user and privileges.
2. define('QA_PERSISTENT_CONN_DB', false);
3. I do not have permission to that but if necessary I will upgrade to VPS hosting
by
I got it. This phenomenon occurs when access to your site becomes excessive. I guess it is caused by MySQL connection limit. Please look a little more appearance. And, if error occurs frequently, you should move the server or database. There is a method of changing the entire server. But, there is also a method to rent a another server for the only database. In addition, because allocated memory of cheap VPS is small, there is an excessive process is forcibly killed. If you have a budget, I recommend dedicated server or full managed dedicated server.
...