想請教一下.有人遇到過cron執行失敗的問題嗎?
小弟在今天執行cron時.竟然顯示執行失敗..整個傻眼= =.
我該從哪裡下手去找錯誤...因為沒顯示失敗的原因...只有在執行的那裡顯示失敗...
請指點一下.感謝
模块太多或者网站内容节点太多都会导致cron超时失败的, 只需要暂时关闭些消耗资源严重的模块(比如search index), cron就可以运行了,
aggregator 经常会有这个问题,暂时把它关闭掉,或者删除有问题的 feed 可能会有帮助。 ------------------------------------------- 网站建设
好像是消耗太多記憶體..我改了一下設定.可以使用了.(沒有關閉模組)
可以多跑一點,這樣一次跑就不會消耗太多 你的站流量大? -- from open mind to open source~
修改 includes/module.inc, 如下, 就可以在 watch dog 看到是哪裡掛掉的.
foreach (module_implements($hook) as $module) { $function = $module .'_'. $hook; if ($hook == 'cron') watchdog('cron', "hit $module cron"); // 加上這行 $result = call_user_func_array($function, $args); if (isset($result) && is_array($result)) { $return = array_merge($return, $result); } else if (isset($result)) { $return[] = $result; } }
Re: cron 執行失敗
模块太多或者网站内容节点太多都会导致cron超时失败的, 只需要暂时关闭些消耗资源严重的模块(比如search index), cron就可以运行了,
aggregator 经常会有这个问题,暂时把它关闭掉,或者删除有问题的 feed 可能会有帮助。
-------------------------------------------
网站建设
Re: cron 執行失敗
好像是消耗太多記憶體..我改了一下設定.可以使用了.(沒有關閉模組)
Re: cron 執行失敗
可以多跑一點,這樣一次跑就不會消耗太多
from open mind to open source~
你的站流量大?
--
Re: cron 執行失敗
修改 includes/module.inc, 如下, 就可以在 watch dog 看到是哪裡掛掉的.
foreach (module_implements($hook) as $module) {$function = $module .'_'. $hook;
if ($hook == 'cron') watchdog('cron', "hit $module cron"); // 加上這行
$result = call_user_func_array($function, $args);
if (isset($result) && is_array($result)) {
$return = array_merge($return, $result);
}
else if (isset($result)) {
$return[] = $result;
}
}