Cron jobs not working anymore
Cron jobs were working for months in the past but recently I had a high server load and now cron jobs aren't executing my php files (the same ones that were working before). When I check the cron log I see this which I believe has something to do with the issue:
(CRON) EXEC FAILED (/usr/sbin/sendmail): Resource temporarily unavailable
What do I need to do to fix this problem? I am running CentOS 7.
EDIT: I marked this as answered as I thought a process hanging was causing this issue. Today, I woke up and the same issue occurred. I wonder what could be causing this.
In the cron log, I see:
Oct 11 05:01:01 run-parts(/etc/cron.hourly)[25431]: starting 0anacron
Oct 11 05:01:01 run-parts(/etc/cron.hourly)[25444]: finished 0anacron
Oct 11 05:01:01 run-parts(/etc/cron.hourly)[25431]: starting 0yum-hourly.cron
Oct 11 05:01:01 run-parts(/etc/cron.hourly)[25450]: finished 0yum-hourly.cron
Oct 11 05:01:01 CROND[25434]: (CRON) EXEC FAILED (/usr/sbin/sendmail): Resource temporarily unavailable
Oct 11 05:01:01 CROND[25429]: (apache) MAIL (mailed 71 bytes of output but got status 0x0001
UPDATE:
I noticed two things that look off in my mail log.
Oct 8 14:01:39 postfix/local[12886]: 5180C2D098A5: to=<[email protected]>, orig_to=<N>, relay=local, delay=1.1, delays=0.07/0.01/0/1, dsn=5.1.1, status=bounced (unknown user: "n")
Oct 9 04:19:10 postfix/local[12452]: C8F762D012D6: to=<[email protected]>, orig_to=<apache>, relay=local, delay=0.22, delays=0.13/0.02/0/0.07, dsn=5.2.0, status=bounced (cannot update mailbox /var/mail/root for user root. cannot open file: Is a directory)
(CRON) EXEC FAILED (/usr/sbin/sendmail): Resource temporarily unavailable
This isn't a cron problem. from exec(3):
The execl(), execle(), execlp(), execvp() and execvP() functions may fail and set errno for any of the errors specified for the library functions execve(2) and malloc(3).
From execve(2):
[ENOMEM] The new process requires more virtual memory than is allowed by the imposed maximum (getrlimit(2)).
From malloc(3):
ENOMEM Memory allocation error.
On most UNIX systems, any runaway process can consume enough resources to cause normal virtual memory allocations by non-runaway processes to also fail.
This is not a cron problem, it's a system resource, utilization, or tuning problem.