后台rb定时任务结束
我有一个 backroundrb 计划任务需要很长时间才能运行。 然而,该过程似乎仅在 2.5 分钟后就结束了。
我的background.yml 文件:
:schedules:
:named_worker:
:task_name:
:trigger_args: 0 0 12 * * * *
:data: input_data
当进程运行时,我在服务器上的活动为零。 (这意味着我是服务器上唯一一个观察日志文件执行其操作的人,直到该过程突然停止。)
有什么想法吗?
I have a backroundrb scheduled task that takes quite a long time to run. However it seems that the process is ending after only 2.5 minutes.
My background.yml file:
:schedules:
:named_worker:
:task_name:
:trigger_args: 0 0 12 * * * *
:data: input_data
I have zero activity on the server when the process is running. (Meaning I am the only one on the server watching the log files do their thing until the process suddenly stops.)
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
谢谢安德鲁。 这些调试技巧很有帮助。 特别是 begin..rescue..end 块。
但调试起来仍然很痛苦。 最终,BackgroundRB 并没有在 2.5 分钟后缩短。 正在建立网络连接,但未正确关闭。 一旦找到并关闭,一切都会很好。
Thanks Andrew. Those debugging tips helped. Especially the begin..rescue..end block.
It was still a pain to debug though. In the end it wasn't BackgroundRB cutting short after 2.5 minutes. There was a network connection being made that wasn't being closed properly. Once that was found and closed, everything works great.
这里没有太多信息可以让我们深入了解问题的根源。
由于backgroundrb在后台运行,因此监视/调试可能非常困难。
以下是我使用的一些想法:
There's not much information here that allows us to get to the bottom of the problem.
Because backgroundrb operates in the background, it can be quite hard to monitor/debug.
Here are some ideas I use: