cezihcp Posted July 2, 2017 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.
Krydos Posted July 2, 2017 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.
cezihcp Posted July 2, 2017 Author 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now