chrisrusso Posted August 2, 2014 Share Posted August 2, 2014 Hi, I'm Chris, first time here, I usually post on stackoverflow but I think that this is a little bit more complex than usual. I believe I really need a PHP expert to solve this issue. We have an application which is crawling the web. There's 2 main PHP scripts that are doing the work, using using proc_open, and exec() and running over a circular reference. Both scripts that compose the main structure are saving all and every single error on a custom error log, defined this way: //error_log@ini_set('error_reporting', -1);@ini_set('log_errors','On');@ini_set('display_errors','On');@ini_set('error_log','/var/www/vhosts/xxx/xxx/resonance/such_a_mess'); The problem is simple, after running for some hours or days, the application stops crawling. And there's no error information at all on the error_logs that could explain the problem or the reason why it stopped. I've been trying to get more details using Newrelic and XHProf, no luck.- There's no HTTP server involved on the execution of the scripts as they are being executed like I mentioned, using exec() and proc_open: exec("sh -c \"$cmd | logger\" > /dev/null &"); It has been around 3 months on the same situation... and to be honest the only thing I want at this point is to see a fatal error on the logs, to understand what's going on... Quote Link to comment https://forums.phpfreaks.com/topic/290232-a-crash-and-no-errors/ Share on other sites More sharing options...
ginerjm Posted August 2, 2014 Share Posted August 2, 2014 Why do you have display errors on? Won't that display to your console as well as your log? Why do you have @ in front of those commands? You don't want to know about any error that may occur? Are you sure your script has access to the desired error log location? Is there in fact a log file to view? How about logging your progress as your script proceeds? Maybe it's a particular site that is killing your script somehow. Quote Link to comment https://forums.phpfreaks.com/topic/290232-a-crash-and-no-errors/#findComment-1486677 Share on other sites More sharing options...
nik_jain Posted August 2, 2014 Share Posted August 2, 2014 You could try : 1. searching for die|exit in the whole project, just in case there isn't any of those lying about somewhere. 2. ensure set_time_limit is set to 0 3. http://php.net/manual/en/function.register-shutdown-function.php Quote Link to comment https://forums.phpfreaks.com/topic/290232-a-crash-and-no-errors/#findComment-1486682 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.