Prevent 'too many connections'(ConnectionPool is not the answer, looking for mysql server side solution)
===

A few weeks ago, I post a question about queuing database access request to prevent 'too many connection' error when massive concurrent db requests happen. People told me ConnectionPool is the right way to go which I agreed at that time. However, I fianlly realized this is not the solution especially there are a lot of different clients accessing mysql server through network, because connection pool is at client side it can not prevent the sum of connections of all clients from exceeding the max connection number of mysql server.

I think there should be some middleware on the mysql server working as a queue or pool, is anybody familiar with this? Thank you.

I know this question is widely asked, I am also surprised as if there is no total solution for it.  