isaacmagno98 Posted April 14 Posted April 14 Hi, I am having issues when I try to connect to my db already has more than 'max_user_connections' active connections How can I solve it? There is any way where I can close the connections by myself? Since now, thanks for u help
isaacmagno98 Posted April 16 Author Posted April 16 Can someone help me with this? It's fixed for a while, but when I run some tests on my database (like 2 tests), this issue occurs again and I have to wait
wolstech Posted April 16 Posted April 16 This is going to be dependent on your code and the language you use. Krydos can explain more.
isaacmagno98 Posted April 16 Author Posted April 16 I am currently using NodeJS and Sequelize as ORM, but when I use MySQL Workbench it also happens
Krydos Posted April 16 Posted April 16 It's really not complicated. Just close your connections when you're done using them, and don't try to open 100s of them at the same time. https://stackoverflow.com/questions/19563474/how-to-close-database-connection-in-node-js I believe MySQL Workbench only uses 1 connection at a time, but if all 10 of your available connections are already taken by Node then it won't be able to connect with even 1. If you can't figure out how to add connection.end(); to your code you can always get a VPS where you can open 10000 simultaneous connections without blocking everyone else from accessing the database. They start at $4 per month and are available at https://heliohost.org/vps/
Recommended Posts