PHP Classes

Leaving MySQL connections open

Recommend this page to a friend!

      Metabase  >  All threads  >  Leaving MySQL connections open  >  (Un) Subscribe thread alerts  
Subject:Leaving MySQL connections open
Summary:metabase not closing mysql connections?
Messages:3
Author:Joe Phillips
Date:2007-05-04 13:24:54
Update:2007-05-04 14:41:50
 

  1. Leaving MySQL connections open   Reply   Report abuse  
Picture of Joe Phillips Joe Phillips - 2007-05-04 13:24:54
We have a few sites on our server that are using metabase, and they all seem to have the same problem. They leave MySQL connections open, and if they aren't killed by hand, they stack up and bring our server to a halt. Any ideas on why this might be happening and a possible work-around?

I'm not very familiar with metabase and inherited these sites from another programmer, so any information might be helpful.

Thanks

  2. Re: Leaving MySQL connections open   Reply   Report abuse  
Picture of Joe Phillips Joe Phillips - 2007-05-04 13:46:38 - In reply to message 1 from Joe Phillips
I found the solution myself. persistent was set to 1 in metabase_database.php when it should have been set to 0.

  3. Re: Leaving MySQL connections open   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-05-04 14:41:50 - In reply to message 1 from Joe Phillips
When you use persistent connections, PHP does not close such database connections.

If you do not use persistent connections, your application may become too slow.

There are solutions to achieve a compromise, as explained in this page:

meta-language.net/metabase-faq.html ...