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-
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.
and install cache plugins for WP, your site will have static pages and the load will decrease dramatically.
I'd recommend using php caching like xcache. Also make sure your apache config is optimized...especially maxclients value.
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
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.