Hot answers tagged process
The linux kernel has a so-called OOM Killer built-in. It is the "Out of memory killer". So when your box has exhausted its ram & swap, the kernel will start killing stuff to make the server accessible. You can tweak the priorities of processes, to determine the "likelihood" of a process being killed. Read more at this link, see section "Configuring ...
To kill all processes for the user, you have a few options. I like: su - username then kill -9 -1 To see which "cron" processes belong to user : pgrep -u username cron To kill those processes: pkill -u username cron
Use: kill -6 $(pgrep -U username cron) You can search with pgrep full string with "-f" arg if you need to kill specific cron jobs, while let others live. kill signal is pretty dangerous really, so you should check what you are going to kill. If username is 'root' then you can kill important things, yes.
If these apps are running inside an apache2 server, you can tune the server. Consider: Limit the MaxRequestWorkers (This limits number of workers using memory). Limit the MaxConnectionsPerChild (This recycles servers so that they don't consume to much memory. This is useful if the applications are leaking memory. If your processes are leaking memory, ...
First of all I would say restart is not a problem of solution and the better way is to found the offending process and why it's consuming high memory. Like mentioned above linux already have OOM mechanism to find the offending process and to kill it to release memory pressure Other way to find it out using Kdump,configure this parameter vm.panic_on_oom = ...
The normal fair share approach work well for most work loads, and it is not common to tune priorities for performance. Tuning process priorities can have undesirable side-effects. There are cases, such as batch processes, where applications are specifically niced. You will need root privileges to give the JVM higher than normal priority. This might be ...
Only top voted, non community-wiki answers of a minimum length are eligible