I conduct online auctions on lamp stack, ubuntu, aws. I have a cron (postsale_cron.php) that runs every 15 minutes to process the auctions that ran in the previous 15 minute window. It looks in our queue database and pulls all auctions that were finished in that window and calls popen to run process_auction.php for each such auction. The expectation is that the cron will spawn this function for each auction so it processes multiple auctions in parallel.
When we run process_auction.php manually from command line for a single auction, it runs properly regardless of whether there are PHP notices or warnings.
When we run as cron through cron job, postsale_cron.php returns a message saying that it ran process_auction.php for all auctions (3 during test), but some or none actually run. Very inconsistent. It appears that if there is only one cron, it works. But if multiple, then it doesn't. It also appears that if there are any PHP Warnings or Notices, that process_auction.php instance does not finish and nothing thereafter runs/finishes. But very hard to tell. I have put write to file statements in process_auction.php so it can create separate logs for each process but they do not get created if there is a problem with any of the processes.
In postsale_cron.php:
$handle = popen("php $path $ClientID $end_date &","r"); // $path defined as /var/.../process_auction.php
$pstatus = pclose($handle); // close the stream created by popen();
$pstatus
results are 0 for each auction
Process auction should run each auction independently, if some are exiting due to warnings, then remaining should complete without if they don't have errors but background processes seem to all halt