Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^5: Optimize DBI connect to avoid max_user_connections

by fishmonger (Chaplain)
on May 29, 2014 at 21:53 UTC ( #1087882=note: print w/replies, xml ) Need Help??

in reply to Re^4: Optimize DBI connect to avoid max_user_connections
in thread Optimize DBI connect to avoid max_user_connections

If you don't do an explicit disconnect, the module should do it for you when the handle goes out of scope or as part of the garbage collection process when the script ends. However, that doesn't always happen. I had a script connecting to a pervasive db and didn't have an explicit disconnect. Latter I learned that connections weren't being disconnected which caused the db to lockup when it reached the max connections.

The next time this problem comes up connect to the mysql cli or you can use phpmyadmin to run the following command.
show full processlist;

That will show you the connections and processes being executed.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1087882]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-08-16 17:22 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (169 votes). Check out past polls.