Answer the question
In order to leave comments, you need to log in
How to make an automatic restart on error on a php site?
Hello. On my site, I periodically get a critical error "fatal error: Cannot access property Response::$headers in", which blocks the entire site.
What I want. Cron should check the site every, let's say 5 minutes. If it checks, it detects this error, it must restart the php service. Does anyone know how to do this or is there a ready made solution?
Answer the question
In order to leave comments, you need to log in
Most likely you need to create a bash script that will periodically pull your cron that will check the presence of this error in the web server logs, and if it is present then restart your web server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question