设计Async + Sidekiq + sendmail超时

时间:2013-04-16 11:42:32

标签: devise timeout sendmail sidekiq

我使用Sidekiq :: Extensions :: DelayedMailer获得超时。

有没有人知道如何将超时时间更改为更长,以便Sidekiq可以成功发送消息?

这是我的logdump:

2013-04-16T11:29:19Z 14364 TID-ows844wu8 Sidekiq :: Extensions :: DelayedMailer JID-4eb850367f8aec39032b8ee5 INFO:start

2013-04-16T11:29:49Z 14364 TID-ows844wu8 Sidekiq :: Extensions :: DelayedMailer JID-4eb850367f8aec39032b8ee5信息:失败:30.345秒

2013-04-16T11:29:49Z 14364 TID-ows844wu8警告:{

"重试" = GT;真,

"队列" = GT;"默认",

"超时&#34 =大于30,

"类" = GT;" Sidekiq ::扩展:: DelayedMailer",

" ARGS" = GT; [" --- \ n

  • !ruby / class' Devise :: Mailer' \ n

  • :unlock_instructions的\ n -

  • 红宝石/对象:用户\ n

    属性:\ n

    id:5 \ n

    电子邮件:asdf@asdf.com \ n

    encrypted_pa​​ssword:$ 2a $ 10 $ sqEWtyjRuUXMyE31k9f13uE17IO1WuRaqNgOOI6Smzxh3B85SenTq \ n

    reset_password_token:\ n

    reset_password_sent_at:\ n

    remember_created_at:\ n

    sign_in_count:1 \ n

    current_sign_in_at:2013-04-16 11:24:00.000000000 Z \ n

    last_sign_in_at:2013-04-16 11:24:00.000000000 Z \ n

    current_sign_in_ip:127.0.0.1 \ n

    last_sign_in_ip:127.0.0.1 \ n

    created_at:2013-04-16 10:31:14.000000000 Z \ n

    updated_at:2013-04-16 11:24:46.219896623 Z \ n

    用户名:\ n

    名称:asdf \ n

    地址:'' \ n

    电话:' + 46709771430' \ n

    confirmation_token:\ n

    confirmed_at:2013-04-16 11:24:00.000000000 Z \ n

    confirmation_sent_at:2013-04-16 10:31:14.000000000 Z \ n

    failed_attempts:4 \ n

    unlock_token:Nn6ZtD4zFMMRRYqbZV5u \ n

    locked_at:2013-04-16 11:24:46.214709086 Z \ n"],

" JID" = GT;" 4eb850367f8aec39032b8ee5",

" error_message" =>"执行过期",

" error_class" = GT;"超时::错误",

" failed_at" = GT;" 2013-04-16T11:25:16Z",

" RETRY_COUNT" =→3,

" retried_at" => 2013-04-16 11:29:49 UTC}

2013-04-16T11:29:49Z 14364 TID-ows844wu8警告:执行已过期

2013-04-16T11:29:49Z 14364 TID-ows844wu8警告:/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/network/delivery_methods/sendmail .rb:56:在'close'

/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/network/delivery_methods/sendmail.rb:56:in“popen'

/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/network/delivery_methods/sendmail.rb:56:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/network/delivery_methods/sendmail.rb:52:in`defer!'

/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/message.rb:2034:in`do_delivery&& 39;

/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/message.rb:229:in"clock in deliver'

/usr/local/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.9/lib/action_mailer/base.rb:415:in,clock in deliver_mail'

/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in"block in instrument'

/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/notifications/instrumenter.rb:20:in` instrument'

/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.9/lib/active_support/notifications.rb:123:in“instrument'

/usr/local/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.9/lib/action_mailer/base.rb:413:in'revery_mail'

/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/lib/mail/message.rb:229:in`deport'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/extensions/action_mailer.rb:23:in`exese'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/processor.rb:43:in块(3级)正在处理'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/chain.rb:79:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/chain.rb:79:in`clock in invoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/server/timeout.rb:11:in`clock in call'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/server/timeout.rb:10:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/chain.rb:81:in`clock in invoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/server/active_record.rb:6:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/chain.rb:81:in`clock in invoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/server/retry_jobs.rb:49:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/chain.rb:81:in`clock in invoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/server/logging.rb:11:in`clock in call'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/logging.rb:22:in`with_context'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/server/logging.rb:7:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/chain.rb:81:in`clock in invoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/chain.rb:84:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/chain.rb:84:in`adoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/processor.rb:42:inclock(2级)正在处理'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/processor.rb:77:在`stats'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/processor.rb:41:in在阻止进程'

/usr/local/lib/ruby/gems/1.9.1/gems/celluloid-0.12.3/lib/celluloid/calls.rb:57:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/celluloid-0.12.3/lib/celluloid/calls.rb:57:in`dispatch'

/usr/local/lib/ruby/gems/1.9.1/gems/celluloid-0.12.3/lib/celluloid/future.rb:18:in块初始化'

/usr/local/lib/ruby/gems/1.9.1/gems/celluloid-0.12.3/lib/celluloid/internal_pool.rb:48:in`call'

/usr/local/lib/ruby/gems/1.9.1/gems/celluloid-0.12.3/lib/celluloid/internal_pool.rb:48:in,clock in create'

1 个答案:

答案 0 :(得分:0)

在此处找到答案。简单的FQDN问题。

https://serverfault.com/questions/58363/my-unqualified-host-name-foo-bar-unknown-problem

使用以下命令编辑my / ets / hosts: 127.0.0.1 localhost.localdomain localhost

在终端中运行$ hostname以获取您的主机名。