pythonmysqlherokumysql-pythoncleardb

How to set max user connections in python environment?


Currently I am working on a bot using mysql connector , which is python library that allows you to communicate with mysql. I am running ClearDB on Heroku.
Sometimes while I am running certain commands I run into the following error.

Error Code: 1226 User 'b450a27c71705e' has exceeded the 'max_user_connections' resource (current value: 10)

While this error hasn't seemed to stop any of my commands from running , i'd rather change the allowed amount of user connections before it does.
Unfortunately , the only answers I can find are for PHP , which is ,

SET GLOBAL max_user_connections = 100;

Any idea how to replicate this in python?


Solution

  • You are using a ClearDB plan that only permits 10 connections. The only path they offer is to upgrade to a ClearDB plan that offers more connections. If you're on Mercury, upgrade to Jupiter or Saturn. If in doubt, post your question to the ClearDB Support system. They will be able to help you best.

    The multi-tenant systems will not permit you to modify this parameter.