Use Pagoda scheduled tasks to monitor MySQL running status shell script to achieve stop and self-start

888u

Last update at :2024-01-20,Edit by888u

We have encountered a problem in the past few days, that is, when the memory of the server or VPS is too small, or when the swap is too small, it will cause insufficient system memory and MySQL will crash. For the Pagoda panel, MySQL frequently crashes due to too small memory. Problem, we give a solution, just add the "shell that releases memory" task in the scheduled task of the pagoda panel.

pgrep -x mysqld &> /dev/null if [ $? -ne 0 ]; then bash /www/server/panel/script/rememory.sh /etc/init.d/mysqld start fi

Recommended site search: registered domain name query, independent IP host, Alibaba Cloud registration, network server rental, domain name query, domain name registration, domain name registration number query, telecommunications server rental, Wanwang domain name registration official website, 6 yuan per year Cloud server,

Use Pagoda scheduled tasks to monitor MySQL running status shell script to achieve stop and self-start

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码