【问题标题】:Delayed::Job when using Monit and Memory ErrorDelayed::Job 使用监视器和内存错误时
【发布时间】:2011-01-10 10:30:59
【问题描述】:

所以我已经延迟了一段时间::Job 在生产环境中流畅运行了一段时间。

每当我改变工作时,我都会(在生产环境中提醒你)

  1. 使用我使用的 [脚本] (https://github.com/tobi/delayed_job/wiki/Running-Delayed::Worker-as-a-daemon) 重新启动延迟的作业
  2. 使用rake jobs:clear清除作业

另外,我已经运行了 monit,我已经停止了 monit,重新启动了脚本,然后按顺序启动了 monit……仍然没有骰子。

无论如何,我们都这样做是为了从内存中删除旧作业,我清除作业队列只是因为这就是我所做的。可能不需要该步骤,在我的应用程序中它不会受到伤害。

但是,由于某种原因,最近使用这些步骤并没有重置我的新工作代码。当我查看我的 job_runner.log 文件时,我在重新启动脚本时收到此错误

*** below you find the most recent exception thrown, this will be likely (but not    certainly) the exception that made the applicati
on exit abnormally ***
#<SystemExit: exit>*** below you find all exception objects found in memory, some of them may have been thrown in your application, others may just be in memory because they are standard exceptions ***
#<NoMemoryError: failed to allocate memory>
#<SystemStackError: stack level too deep>
#<fatal: exception reentered>
#<LoadError: no such file to load -- rubygems/defaults/operating_system>
#<LoadError: no such file to load -- daemons>
#<NameError: uninitialized constant Rails::Plugin::HoptoadNotifier>
#<Errno::ENOENT: No such file or directory - /var/rails/wigify/tmp/pids/job_runner.pid>
#<SystemExit: exit>

所以我不确定发生了什么。堆栈级别太深的错误,是否来自我的代码?我所有的集成测试都通过了,就像以前一样。

我的切片是否存在内存问题?即使free 告诉我我这样做时平均有 300MB?

这里谁能帮帮兄弟?

【问题讨论】:

    标签: ruby-on-rails delayed-job monit


    【解决方案1】:

    好吧,我认为问题已经解决了。无论我尝试了 100 次,每次的 ram 都太少,还是没有,但有一次它自己修复了。

    不是我想要的答案,但还是很奇怪。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-10-29
      • 1970-01-01
      • 1970-01-01
      • 2011-03-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多