Help me with this memory problem pls.

Discussion in 'Site & Server Administration' started by cheetuh, Nov 8, 2007.

  1. #1
    Hi. I run a few celebrity sites, and there is one that has big traffic (about 5k uniques day and 15k page views).
    When i restart my server, i have about 500 mb of the 1gb of ram free. a few hours later, i have about just 100 mb free, and after 2 days i have 30mb free and notice my visits getting lower and lower (which means im losing traffic cause people simply cannot open page.

    My websites are made in wordpress so they are all php and use lots of database connections.

    My server is a pentium 4 3.0 and i have 1gb of ram. When i do "free" command over SSH i see
    Total Memory : 1026456
    Used : 838116
    Free: 118000 (server is just up for 4 hours)
    Buffers: 37774
    Cached: 405816

    Swap: 0 0 0
    Free memory (-cache ) is 631900
    This means i have real 600 mb free, but 405mb of it are in cache. Is there any way to clear cache without restarting server? cause my site simply wont open! When my real free memory is low (the one not discounting the cache) you try to open my site and its just keep trying to open and after a few secs say : Page connot be opened or found.

    Till yesterday i had my php memory limit at 8mb (server default) and i changed it to 64 . Could this help me?

    Pls share your toughts-
     
    cheetuh, Nov 8, 2007 IP
  2. ray9

    ray9 Guest

    Messages:
    69
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Linux servers use up all memory to store cached info from the disk (for faster acccess). That gets thrown out as soon as the memory is needed for something else. So linu servers should have very little free memory, no matter how busy the server is.
     
    ray9, Nov 8, 2007 IP
  3. dotboost

    dotboost Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    and install cache plugins for WP, your site will have static pages and the load will decrease dramatically.
     
    dotboost, Nov 11, 2007 IP
  4. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'd recommend using php caching like xcache.
    Also make sure your apache config is optimized...especially maxclients value.
     
    agnivo007, Nov 13, 2007 IP
  5. cheetuh

    cheetuh Peon

    Messages:
    410
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    which values should i set over max clients on Apache? any ideias? i think i had 100 for many time (it was the default set). should i change to more? sometimes i have abou 30k uniques daily
     
    cheetuh, Nov 15, 2007 IP
  6. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The location os the apache config file:

    /etc/httpd/conf/httpd.conf

    100 is too low for w website with 30k uniques. The default value is 300, not 100.

    You should increase this value, also don't make it extremely high or you'll have your server frozen every few hours or minutes. It basically depends on the resources you have, mainly CPU and Memory.
     
    inworx, Nov 15, 2007 IP