【问题标题】:Cron Process Keeps Being Killed in EngineYardCron 进程在 EngineYard 中不断被杀死
【发布时间】:2011-09-27 02:34:14
【问题描述】:

我的 engineyard 应用程序中不断收到“FAILURE Process cron: is down”警报。几分钟后,我收到一个后续警报,提到该过程再次备份。以前有人注意到这个问题吗?

【问题讨论】:

    标签: cron engineyard


    【解决方案1】:

    事实证明,engineyard 期望每分钟都有一个 cron 条目来访问文件:

    # This and the remote_file for cron_nanny go together
    # Cron touches a file every minute
    cron 'touch cron-check' do
      minute  '*'
      hour    '*'
      day     '*'
      month   '*'
      weekday '*'
      command 'touch /tmp/cron-check'
    end
    

    名为 cron_nanny (/engineyard/bin/cron_nanny) 的配套脚本会检查所触及文件的修改时间,如果超过 120 秒,则会终止 crond 进程并重新启动。

    我碰巧删除了自定义厨师食谱中的所有 cron 条目,这导致 touch cron 作业被删除,因此每 120 秒左右,cron_nanny 脚本将重新启动该过程。

    【讨论】:

      猜你喜欢
      • 2015-09-25
      • 1970-01-01
      • 2010-12-08
      • 1970-01-01
      • 2011-09-09
      • 1970-01-01
      • 2013-04-07
      • 2012-09-21
      • 1970-01-01
      相关资源
      最近更新 更多