0

我正在使用带有 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)
4

1 回答 1

0

Copycopter should not be messaged from the views. The client works by forking a process and contacting Copycopter every 300 seconds. That number is configurable in the polling_delay setting:

https://github.com/copycopter/copycopter-ruby-client/blob/master/lib/copycopter_client/configuration.rb

Maybe the logs above look like Copycopter is part of the app's GET requests because Copycopter's output is being mixed into the logs at funny times.

The Timeout::Error I assume is a problem on the copycopter-server side. How is the server being run? Is it on Heroku with one dyno and the app is going to sleep after 20 or 30 seconds of inactivity? That would be my guess since it is occasionally downloading the translations according to the logs:

Downloaded translations 249

于 2012-08-01T14:56:46.573 回答