Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1087882]
help
Chatterbox?
[stevieb]: I just received full professional license for ALL of JetBrains software due to requesting their opensource request form! I wanted only CLion, but they give them all
[stevieb]: I stated I use IDEA for Perl work, and at work, licensed version of PyCharm
[beech]: is that a good thing?
[stevieb]: absolutely. Free professional IDEs and related software for all the langs I write in, and I wanted CLion because it's a C IDE that can communicate directly with an Arduino

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-02-20 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (302 votes). Check out past polls.