I just uploaded my current project on a free PHP hosting website and when i and my friend visited the website i got from PDO (MySQL) the error SQLSTATE  Too many connections.
I use a Singleton class to manage the PDO (so i create only 1 PDO instance to do the queries). I do not close the PDO (set the PDO = null) since i read that the PHP does it by itself at the end of script execution.
I checked the mysql max_connections and it is set to 150. Isn't it a little weird to show this message with only 2 visitors???
Are the max_connections being shared/affected from other websites hosted on the same server (I can't imagine any other cause)?
Any ideas what causes this...