Common problems No free connection to administer db
Customers sometimes complain that they can’t reach their database. Now, that can happen for all kinds of reasons, starting with operator error, continuing through alien invasions of the datacenter. (The latter hasn’t happened yet – at least as far as we know!) But there’s a particular version of this issue where the customer’s application is running fine, but the user can’t reach the db from their console or admin tool.
The problem is really simple, when you think about it. Each db is allowed up to a particular number of simultaneous connections, and so it’s natural to configure your application with that number in your connection pool. But if all those connections are getting used, what happens when you try to reach your db with MySQL Workbench to add a new table or perform maintenance or whatever? That’s right – you can’t. You’ll get a max_user_connections error.
If you find yourself locked out of your own db in this way, you may need to edit your application’s settings to temporarily reduce the number of connections it will take. The specifics of doing that will of course depend on what your app is written in. If you need help, you can always open up a support ticket and we can point you at online resources for help. One note: if your app is written in PHP, you are probably not using persistent connections. And under those circumstances, if you’re running out of connections, it’s time to upgrade your db!