cezihcp Posted July 2, 2017 Share Posted July 2, 2017 Hi again, I'm trying to connect to a database remotely via vb.net and have setup remote access and a new user for the database(one which I have not yet used to connect to the database) and I'm getting the error that the user has more active connections than the allowed max_user_connections. The weirder thing is than when i check the process list the named user cezihred_euput isn't even listed, just my cpanel username twice as the user. Quote Link to comment Share on other sites More sharing options...
Krydos Posted July 2, 2017 Share Posted July 2, 2017 That error is because you're using persistent connections. I checked and you had a bunch of open mysql connections just sleeping. Some of which hadn't sent or received a single byte of data in over two hours. The solution to this error is to close your connections after you're done using them. If each connection is only open for a couple milliseconds while the query is being performed and then closed immediately it would be highly unlikely you'd ever see this error again. Let me know if you need me to manually close your connections again. Quote Link to comment Share on other sites More sharing options...
cezihcp Posted July 2, 2017 Author Share Posted July 2, 2017 That's interesting... I always close them post query... Yes, I would appreciate if you closed them. UPDATE:just checked and I had a script with a rather big if/else tree and I neglected to foresee that if one if failed that the connectionwouldn't be close. It's fixed now, sorry for the bother. Quote Link to comment Share on other sites More sharing options...
Krydos Posted July 2, 2017 Share Posted July 2, 2017 You don't have any open connections currently. Quote Link to comment Share on other sites More sharing options...
cezihcp Posted July 2, 2017 Author Share Posted July 2, 2017 Thank you, everything works now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.