Cron工作在过去几个月工作,但最近我有一个高服务器负载,现在cron作业不执行我的PHP文件(与以前工作相同的)。 当我检查cron日志时,我发现我认为这与这个问题有关:
(CRON) EXEC FAILED (/usr/sbin/sendmail): Resource temporarily unavailable
我需要做些什么来解决这个问题? 我正在运行CentOS 7。
编辑:我标记为答复,因为我认为一个过程挂是造成这个问题。 今天,我醒了,发生同样的问题。 我不知道是什么原因造成的。
在cron日志中,我看到:
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
更新:
我注意到有两件东西在我的邮件日志中显示。
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):资源暂时不可用
这不是一个cron问题。 从执行(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).
来自execve(2):
[ENOMEM] The new process requires more virtual memory than is allowed by the imposed maximum (getrlimit(2)).
来自malloc(3):
ENOMEM Memory allocation error.
在大多数UNIX系统上,任何失控进程都会消耗足够的资源,导致非失控进程的正常虚拟内存分配也会失败。
这不是一个cron问题,这是一个系统资源,利用率或调整问题。