Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
https://bbs.archlinux.org/viewtopic.php?id=158774
but it's better to lock the program that eats RAM
disable swap, then oom-killer will kill processes if there is not enough memory.
find a software with a memory leak, unsubscribe to the developers about the problem and wait for a patch.
If heavy software is used that really needs a lot of RAM, then actually add RAM.
so look at the top who devours the RAM and unsubscribe, the manna has already run out for today and the telepaths have gone to charge :)
Add a swap partition, when the RAM runs out everything will slow down, but at least somehow work.
At one time, a patch was needed, but the curve worked.
#!/bin/bash
# Делаем релоад апачь, если свободной памяти меньше 1 гб.
a=$(free -m -o | grep "Mem:" | awk {'print $4'})
if [ $a -lt 1024 ]
then
/etc/init.d/httpd reload
echo `date`>> /var/log/restart.txt
#чистим swap - может занять минут 10
swapoff -a && swapon -a
fi
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question