hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : Sql is not closing connections

Forum Jump

Sql is not closing connections

Reply Post New Thread In Hosting Software and Control Panels Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Web Hosting Master
Join Date: May 2009
Location: Greece
Posts: 963

Sql is not closing connections


When i restart my sql server i got cpu load 45% and mem 2% and after 8 hours is going to 90% and ram 3% and after 8 more hours i have cpu load 140% and ram 4% and after that when all user are gone from my forum after midnight ithe database keep the same load and is not going down

Only if i restart it is going down for many hours and then start again to increase all stats....

Timeout 45
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
ServerLimit 2048
MaxClients 1000

I thought also that maybe persistent connections must be off from php.ini but i am not sure that this is the problem....

Any ideas?

Thank you

Sponsored Links
WHT Addict
Join Date: Dec 2010
Posts: 101
It might be that your PHP script is leaking.

Make sure you have mysql_close() around the place. Also why is your MaxClients so insanely high? Unless you are running very, very, popular websites I dont think you need MaxClients 1000. Also You want MySQL to eat up ram, if set up properly. So it works off RAM more than your hard drive.

To be perfectly honest it looks like you need someone to optimize your server for you. But first make sure your php scripts are running mysql_close(). See if that helps.

Web Hosting Master
Join Date: May 2009
Location: Greece
Posts: 963
It i san invision forum and i don't know how can i check for mysql_close().

Sponsored Links
Warp Speed!
Join Date: Feb 2008
Location: Houston, Texas, USA
Posts: 2,858
I can think of many things that can lead to this. I'm not sure fiddling with Apache will help with MySQL. Try running a check on all tables in the forum DB if you haven't already and post more info (node, free ram, show full processlist, etc).


UNIXy - Fully Managed Servers and Clusters - Established in 2006
[ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance - Los Angeles | Houston | Atlanta | Rotterdam
Love to help pro bono (time permitting). joe >

WHT Addict
Join Date: Dec 2010
Posts: 101
OK as its a forum you would assume it's already reasonably optimized and bug free.

It sounds like your forum is reasonably busy. What you need is server optimization. Make a thread on WHT otherwise PM me I can give you some pointers.


Similar Threads
Thread Thread Starter Forum Replies Last Post
closing mysql connections linktome Hosting Security and Technology 8 02-27-2007 06:56 AM
SQL connections macfan Web Hosting 7 03-05-2006 06:45 PM
Which SQL server allows more connections? latheesan Hosting Security and Technology 9 11-19-2005 05:44 PM
SQL Connections Furton Hosting Security and Technology 8 06-30-2004 12:54 PM
Please help me find out which script isnt closing connections lexington Web Hosting 4 03-20-2004 09:01 AM

Related posts from
Title Type Date Posted
HostingCon Global 2015 Web Hosting Events 2015-02-05 15:03:41
Endurance International Group Acquires Arvixe: A Look at the Numbers Blog 2014-11-11 10:59:24
Swarmify's New Approach to Content Delivery Uses Site Visitors to Accelerate Content Web Hosting News 2014-05-01 08:34:03
Microsoft Launches ExpressRoute to Provide Fast and Secure Hybrid Cloud Connections Web Hosting News 2014-02-21 13:20:00
Google Cloud Provides Support For Native MySQL Connections Web Hosting News 2013-11-01 14:36:06

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Web Hosting News:
WHT Membership
WHT Membership



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?