Greeting everyone, well recently I have set up a forum on the free host of 000webhost.com but unfortunately many user on my forum have complain of obtaining this error(see image below) Can anyone give me some idea of what is it about and how to resolve it.
The error you see has nothing to do with your site. The web server that you are hosted on has reached the max connections allowed on the MySQL config. Your host should be notified about this. He can increase the number of connections himself, however doing this may increase the load on his server.
Yes, indeed. Every time any user looks up your website, he or she causes a new connection to the database server to be opened. Many servers only have a limited amount of connections allowed. What you can do: 1) Get a better hoster. Might be expensive. 2) Optimize the forum software so that it runs faster. Many people I know use "SELECT * FROM ..." SQL Querys instead of "SELECT field_name, field_name, field_name FROM ..." when you don't need all of the fields. The second one is a lot faster, as it does not request all the fields from the server. Only get what you need. 3) As you are probably using php, you might want to use mysql_pconnect() instead of mysql_connect() to establish the database connection to your database server. It establishes one permanent connection to the database, which is used for all the queries from all the users. Please note that your hoster may not like this and that this might change the behaviour of some of your scripts. As always, php.net can help you with this command. www.php.net/function.mysql-pconnect It kind of sucks that this forum does not allow me to post links because I'm new here...