Sql is not closing connections

Discussion in 'MySQL' started by ASTRAPI, Dec 16, 2010.

  1. #1
    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
     
    ASTRAPI, Dec 16, 2010 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    What is the value of wait_timeout and interactive_timeout in MySQL? To determine this, run the following queries

    SHOW variables like 'wait_timeout';
    SHOW variables like 'interactive_timeout';
    Code (markup):
     
    mwasif, Feb 6, 2011 IP
  3. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    then adjust them in y our my.conf file to correct the issue
     
    srisen2, Feb 14, 2011 IP