InsideDarkWeb.com

Linux kernel.panic not working as expected

For the last 2 months I’v been investigating a problem related to some unexpected "freezes" of my Ubuntu VPS.

Somehow my VPS stops working entering an uncontrolled state, which can only be resolved by restarting manually the machine.

I thought the problem was related to memory leaks, so I decided to add the following variables to sysctl to the issue:

# panic kernel on OOM
vm.panic_on_oom=1
# reboot after 10 sec on panic
kernel.panic=10

At the beginning I thought the problem was solved (since I thought that the issue was related to the panic mode), but apparently it turned out it wasn’t.

This is a chart of my VPS usage, and as you can see the cpu goes to 100% in few seconds.

enter image description here

My second attempt was to add Monit to my VPS, with some rules to prevent situations like this one by stopping some service after a certain usage of memory/cpu. But I didn’t solve it.

I can’t understand where the problem is, how can I reboot the system automatically when my VPS goes in an uncontrolled state?

UPDATE:

This in an example of my Monit config:

if cpu usage > 50% for 2 cycles then alert
if cpu usage > 60% for 2 cycles then restart
if memory usage > 70% for 4 cycles then alert
if memory usage > 80% for 4 cycles then restart

Unix & Linux Asked by Holis on November 11, 2021

0 Answers

Add your own answers!

Related Questions

Kali Linux 2020.2 Stuck on dragon logo

1  Asked on January 2, 2021 by robotix

     

How to fix Ubuntu 18.04 LTS random freezes again

0  Asked on January 2, 2021 by manmax

 

X11 windows created by root

2  Asked on December 31, 2020 by saga

   

Kubuntu 20.04 Display Errror

0  Asked on December 31, 2020 by emil-dworniczak

       

How to exclude folders in sshfs mounting?

1  Asked on December 30, 2020

 

Ubuntu upgrade leads unmet dependencies

1  Asked on December 29, 2020 by jonkobu

     

How to know on which LAN a machine is connected?

0  Asked on December 29, 2020 by jpc

       

How to validate a line if followed by a specifc line?

2  Asked on December 29, 2020 by user441539

     

LightDM: how to distinguish users with the same name?

2  Asked on December 29, 2020 by maddin25

 

Making bit identical ext2 filesystems

4  Asked on December 28, 2020 by jhufford

       

Which installed software packages use the most disk space on Debian?

9  Asked on December 28, 2020 by mirzhan-irkegulov

   

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.