Auto restart newrelic-daemon if crashed

On a web server with Newrelic APM installed, graph stopped showing new data. On checking the newrelic log file, i get following error root@new-website-2:~# tail -f /var/log/newrelic/php_agent.log 2021-02-08 17:21:27.453 +0000 (680439 680439) warning: daemon connect(fd=13 uds=@newrelic) returned -1 errno=ECONNREFUSED. Failed to connect to the newrelic-daemon. Please make sure that there is a properly configured newrelic-daemon … Read more

PHP Script to monitor Apache/php-fpm

I moved a web site to new dedicated server. But for some reason, php-fpm crashed. I increased the max_children settings, but it happend again. I do not want down time while i am investigating the problem. So i created a PHP script, that will check if site is working or not. Script have 2 part. … Read more