in reply to Optimize DBI connect to avoid max_user_connections

If you're using Apache, take a look at the module Apache::DBI.
  • Comment on Re: Optimize DBI connect to avoid max_user_connections

Replies are listed 'Best First'.
Re^2: Optimize DBI connect to avoid max_user_connections
by Alex-WisdomSeeker (Initiate) on May 29, 2014 at 19:21 UTC
    I will do so, maybe there is another problem, too. The DB went down again this time with lots of "Waiting for table lock" errors. It really is a small site with around 500 visitors per day, I did not have this prblems with my old host so maybe it is a managed server problem. Will go through the scripts and look for not closed db connections again. Thanks a lot so far !

      Sounds like you're using MyISAM. Alter the tables to use the InnoDB engine instead of MyIASM and most if not all of those table lock warnings should go away. InnoDB uses row locks instead of table locks. It can/will use full table locks when warranted for the operation.

        Ok, will give it a try if the problem will persist. Any ideas if the the problem may be in the code ? Until now I did not have an "or db-disconnect & exit" command after the querys if they do not succeed. Could this be the problem so the script goes persistent and waits for the query to finish ? The MyAdmin log showed nothing suspicious just regular querys. Its driving me mad, so sorry for bothering everyone :-(