我正在使用带有ActiveAdmin的CopyCopter。我在消息中收到以下超时错误,管理员端像糖蜜一样移动。为什么copycopter甚至会从ActiveAdmin视图中发送消息?我错过了握手的哪一部分?
14 matches for "Copycopter" in buffer: *run*
12:** [Copycopter] [P:12387] [T:70108530607720] Timeout::Error: Timeout::Error
16:** [Copycopter] [P:12387] [T:70108512996560] Downloaded translations
22:** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: Timeout::Error
38:** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: execution expired
43:** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: Timeout::Error
55:** [Copycopter] [P:12387] [T:70108512996560] Downloaded translations
60:** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: Timeout::Error
72:** [Copycopter] [P:12387] [T:70108512996560] Downloaded translations
79:** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: execution expired
191:** [Copycopter] [P:12387] [T:70108512996560] No new translations
196:** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: Timeout::Error
204:** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: execution expired
244:** [Copycopter] [P:12387] [T:70108512996560] Downloaded translations
249:** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: Timeout::Error
上面的一些消息的更多上下文:
Started GET "/assets/active_admin/nested_menu_arrow_dark.gif" for 127.0.0.1 at 2012-07-31 10:36:34 -0400
Served asset /active_admin/nested_menu_arrow_dark.gif - 200 OK (7ms)
Started GET "/admin/my_page" for 127.0.0.1 at 2012-07-31 10:36:50 -0400
** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: execution expired
Processing by Admin::MyPageController#index as HTML
AdminUser Load (0.3ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1
Rendered /Users/cmmagid/.rvm/gems/ruby-1.9.3-p125@rails32/gems/activeadmin-0.4.4/app/views/active_admin/page/index.html.arb (40.4ms)
Completed 200 OK in 48ms (Views: 43.1ms | ActiveRecord: 0.3ms)
** [Copycopter] [P:12387] [T:70108512996560] Timeout::Error: Timeout::Error
Started GET "/assets/active_admin.css?body=1" for 127.0.0.1 at 2012-07-31 10:37:01 -0400
Served asset /active_admin.css - 304 Not Modified (4ms)
答案 0 :(得分:0)
不应从视图中发送Copycopter消息。客户端通过分叉过程并每300秒联系Copycopter来工作。该号码可在polling_delay
设置中配置:
上面的日志看起来像Copycopter是应用程序的GET请求的一部分,因为Copycopter的输出在有趣的时候被混合到日志中。
我认为Timeout::Error
是copycopter-server
方面的问题。服务器是如何运行的?它是在Heroku上使用一个dyno并且该应用程序将在20或30秒不活动后进入睡眠状态?这是我的猜测,因为它偶尔会根据日志下载翻译:
Downloaded translations 249