Results 1 to 5 of 5
  1. #1
    Join Date
    May 2009

    Question 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

  2. #2
    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.

  3. #3
    Join Date
    May 2009
    It i san invision forum and i don't know how can i check for mysql_close().

  4. #4
    Join Date
    Feb 2008
    Houston, Texas, USA
    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).

    Joe / UNIXY
    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 >

  5. #5
    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

  1. closing mysql connections
    By linktome in forum Hosting Security and Technology
    Replies: 8
    Last Post: 02-27-2007, 06:56 AM
  2. SQL connections
    By macfan in forum Web Hosting
    Replies: 7
    Last Post: 03-05-2006, 06:45 PM
  3. Which SQL server allows more connections?
    By latheesan in forum Hosting Security and Technology
    Replies: 9
    Last Post: 11-19-2005, 05:44 PM
  4. SQL Connections
    By Furton in forum Hosting Security and Technology
    Replies: 8
    Last Post: 06-30-2004, 12:54 PM
  5. Replies: 4
    Last Post: 03-20-2004, 09:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts