Jump to content

How to prevent/catch/diagnose unexpected termination


GreatBigBore

Recommended Posts

I have inherited a script that sometimes terminates unexpectedly. I can't get at the server logs, because the hosting company is lame. So I don't really understand why the script is terminating. I do know that it dies when I call mail(), but I also know that there's nothing wrong with the particular parameters being passed to mail(), because I can restart the script and see that same set of parameters succeed. I have also proven to myself that it's not a memory shortage: sometimes it fails while using 4M of memory, and other times works just fine when using 12M of memory. It's not that the script is running too long; I have seen it successfully run for 20 minutes (yes, minutes!), and I've seen it fail after ten seconds. I have tried register_shutdown_function(), try/catch, and set_error_handler(), and none of these mechanisms can catch the termination--the script just goes away. I'm looking for advice on how to diagnose, prevent, catch, solve the problem.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.