How to handle "Internal Server Error"
Jack <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello all, I'm using Apache2 and mod_fastcgi. I have a fcgi app that runs well most of the time. Sometimes an error occurs in the fcgi code and Apache renders a page that says "Internal Server Error". At the bottom, it displays the installed modules such as fcgi, etc. In some cases, it's because the fcgi module crashed and failed to output the page. Apache will restart the fcgi process upon another request. However, in some other cases, another request doesn't fix it. It seems that the process was still running, although I didn't check. That's my guess because I had to restart Apache to restore it. Apache and mod_fastcgi worked fine with other fcgi modules when this happened so the only reason is that cgi process. So my question is, how to handle the two scenarios of "Internal Service Error"? In the first scenario, when it happens it's ugly but the next request will be ok because a new fcgi process will be started. I'd like to know if there is a way to intercept that "internal server error" page and replace it with my own page which looks better? And in the second scenario, how to detect it when it happens, and what is the best approach to restore the service? Restart Apache will affect all clients, including those not using this fcgi module. Or, find all processes of the fcgi app and kill them all and let Apache restart them on new requests? Or, is there a way to find out which particular process has a problem and only kill that one? I know the best way is to fix the bug... :) -- Best regards, Jack ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/