[PATCH] Raise warning first on "Maximum execution time exceeded"

From: Date: Mon, 22 Mar 2010 14:51:40 +0000
Subject: [PATCH] Raise warning first on "Maximum execution time exceeded"
Groups: php.internals 
Request: Send a blank email to internals+get-47444@lists.php.net to get a copy of this message
Hi list.

We log all errors that happens in our production environment, but as
fatal errors can't be handled from within php, we end up with little
information to go on for further debugging. I'm not very familiar with
the php internals code, but I managed to throw in a hack that appears
to work. In the handler function for timeouts (zend_timeout), I raise
a WARNING, sleep for 1 second and then resume normal behavior, which
results in a fatal error. This gives userland code 1 second to log the
error somewhere, which should be sufficient for debugging.

Would like to get feedback as to if this has any hidden problems, but
otherwise I propose that it's included in the project.

-- 
troels


Attachment: [text/x-diff] zend_timeout_warning.patch

Thread (26 messages)

« previous php.internals (#47444) next »