Results 1 to 5 of 5
Thread: Sql is not closing connections
-
12-16-2010, 09:43 PM #1Web Hosting Master
- Join Date
- May 2009
- Location
- Greece
- Posts
- 1,047
Sql is not closing connections
Hello
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
-
12-16-2010, 10:43 PM #2WHT Addict
- Join Date
- Dec 2010
- Posts
- 103
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.
-
12-16-2010, 11:40 PM #3Web Hosting Master
- Join Date
- May 2009
- Location
- Greece
- Posts
- 1,047
It i san invision forum and i don't know how can i check for mysql_close().
-
12-16-2010, 11:55 PM #4Corporate Member
- Join Date
- Feb 2008
- Location
- Houston, Texas, USA
- Posts
- 3,262
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).
Regards
Joe / UNIXYUNIXy - Fully Managed Servers and Clusters - Established in 2006
Server Management - Unlimited Servers. Unlimited Requests. One Plan!
cPanel Varnish Plugin -- Seamless SSL Caching (Let's Encrypt, AutoSSL, etc)
Slow Site or Server? Unable to handle traffic? Same day performance fix: joe@unixy
-
12-17-2010, 12:06 AM #5WHT Addict
- Join Date
- Dec 2010
- Posts
- 103
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
-
closing mysql connections
By linktome in forum Hosting Security and TechnologyReplies: 8Last Post: 02-27-2007, 06:56 AM -
SQL connections
By macfan in forum Web HostingReplies: 7Last Post: 03-05-2006, 06:45 PM -
Which SQL server allows more connections?
By latheesan in forum Hosting Security and TechnologyReplies: 9Last Post: 11-19-2005, 05:44 PM -
SQL Connections
By Furton in forum Hosting Security and TechnologyReplies: 8Last Post: 06-30-2004, 12:54 PM -
Please help me find out which script isnt closing connections
By lexington in forum Web HostingReplies: 4Last Post: 03-20-2004, 09:01 AM