Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

Since i faced issues with apache2 processes eating all my memory within short time, i found a workaround like this cronjob:

0,15,30,45 * * * * [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

Before my RAM load is 2GB and after cronjob ran, it's 500MB load => 1.5GB free.

The cronjob is set to run on 0,15,30,45 every hour. Isn't there a proper solution which keeps the apache2 in check to avoid running out of memory within any 15min?

http://nopaste.info/a4de552b95.html

share|improve this question

marked as duplicate by Michael Hampton, Wesley, Ward, growse, Jenny D May 20 '13 at 8:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
You seem to have some confusion between RAM and storage. Deleting files won't free up RAM unless they are in a ramdisk. Something else changed your RAM usage. What does top show for Apache's RAM usage? –  Ladadadada Jun 22 '12 at 10:01
    
That command deletes the old session files. That has nothing to do with RAM. –  Zoredache Jun 22 '12 at 10:08
    
Paste your ps aux pls –  Andrew Smith Jun 22 '12 at 10:18
    
@Zoredache: I can't imagine that only the session files take 1,5GB of RAM. –  ledy Jun 22 '12 at 11:15
    
@Andrew Smith: the memory usage + free output: nopaste.info/a4de552b95.html –  ledy Jun 22 '12 at 11:16

1 Answer 1

I don't see any issues here; it certainly doesn't look like you're running out of memory, with only 608MB used. I suspect you need to read Linux Ate My RAM.

See also this question and answer.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.