Very recently, I started getting the SQL max user connections limit reached error. I contacted my host and was notified that my limit is 10 concurrent connections at a time. But SQL is central to my website, so instead of the error I want the code to keep trying to get connection till the query is successful.
How do I do this in PHP?
EDIT: Here is the thing, I make AJAX calls to retrieve the data for the client. Every AJAX call though it takes ~400 milliseconds to finish, opens up a new MySQL connection. With 10 or more users, I run into problems.