Cron job not ending

Hi guys,

Recently we upgraded our PHP version to 5.4.37 since then I noticed that a few cron jobs (cron.php) keep on running for hours and I need to kill the process manually.

Have you already faced some situation or do you have any solution for that ?



Hi Jose,

What kind of processes are running? Have you tried restarting the service that runs the cron(php/apache etc)?



Hi Will,

This server mainly runs apache and we did restart it after php update. The funny thing is that not all cron.php jobs keep on running, I have one or two per day that’s all.



Same here.

I manage about 10 CRMs (all suitecrm, all on the same server) and every morning at 8AM I have 3 instances for which the cron jobs munches up the CPUs and run for hours. Those are the only instances for which I have workflows setup to run on all records (the WF are reminders) and there are less than a few hundred records in the module on which they operate on.

I tried limiting the exec time in the CLI php.ini, but had no luck. The processes still hung up and when I tried limiting the php memory to 128, none of the workflows executed (all failed) and I suspect they don’t even start at this limit. The other workflows (run on new or updated records) worked and kept working without a problem.

Hi Guys,

It’s exactly one process per day that is not ending by itself and that I need to kill. Is it possible to see what the cron job is doing ? I mean is it written in any table what are the tasks he is executing in order to find out which one can cause this behavior.


In my case, the long standing cron job was the aodIndexUnindexed (or Perform Lucene Index). Especially after importing some 300k notes, it was taking it’s sweet time to parse through them.

This is because it adds to the index in 500 record chunks, optimizes the entire index, adds another 500, optimizes the entire thing again … etc.

4 days later …

New episode, I managed to narrow my search to the cron execution time and it’s always the same each day, in my case 22h57. So I wonder why at this time the cron execution never ends although for the other executions everything runs smoothly.



Final round, I couldn’t find the real problem with the cron job so I decided to run it with the timeout unix program in order to have it automatically killed after x minutes. (not a real solution but a workaround)