使用MONIT和内存错误时延迟:: Job
-
23-09-2019 - |
题
因此,我已经拖延了:: Job在生产中跑步跑了一段时间。
每当我改变工作时,我都会(所有人都在生产中介绍您)
- 使用[脚本]重新启动延迟作业(https://github.com/tobi/delayed_job/wiki/running-delayed:: worker-as-a-daemon) 我用了
- 清除工作
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吗?
谁可以帮助一个兄弟?
解决方案
好吧,我认为问题本身解决了。无论我尝试过的100次,我是否都有太少的RAM,还是不尝试的,但有一次它只是修复了自己。
不是我想要的答案,但仍然很奇怪。
不隶属于 StackOverflow