Editing: nginx-error-log-monitor
#!/bin/bash if [ "$(grep -c epoll_wait /var/log/nginx/error.log)" -gt 100000 ]; then echo 'epoll_wait bug detected in nginx, restarting and clearing log' | systemd-cat systemctl restart nginx truncate -s 0 /var/log/nginx/error.log fi
Save
Back