1

我在使用 Sidekiq::Extensions::DelayedMailer 时遇到了超时。

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

这是我的日志转储:

2013-04-16T11:29:19Z 14364 TID-ows844wu8 Sidekiq::Extensions::DelayedMailer JID-4eb850367f8aec39032b8ee5 信息:开始

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

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

“重试”=>真,

“队列”=>“默认”,

“超时”=> 30,

"class"=>"Sidekiq::Extensions::DelayedMailer",

"参数"=>["---\n

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

  • :unlock_instructions\n-

  • !ruby/object:用户\n

    属性:\n

    编号:5\n

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

    加密密码:$2a$10$sqEWtyjRuUXMyE31k9f13uE17IO1WuRaqNgOOI6Smzxh3B85SenTq\n

    重置密码令牌:\n

    reset_password_sent_at:\n

    remember_created_at: \n

    登录计数: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

    更新时间:2013-04-16 11:24:46.219896623 Z\n

    用户名:\n

    名称: asdf\n

    地址:''\n

    电话:'+46709771430'\n

    确认令牌:\n

    确认时间:2013-04-16 11:24:00.000000000 Z\n

    确认发送时间:2013-04-16 10:31:14.000000000 Z\n

    failed_attempts: 4\n

    unlock_token: Nn6ZtD4zFMMRRYqbZV5u\n

    锁定时间:2013-04-16 11:24:46.214709086 Z\n"],

"jid"=>"4eb850367f8aec39032b8ee5",

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

"error_class"=>"超时::错误",

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

“重试计数”=>3,

“重试时间”=>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:在“关闭”中

/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 `deliver!'

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

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

/usr/local/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.9/lib/action_mailer/base.rb:415:in `block in delivery_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 `deliver_mail'

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

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

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/processor.rb:43:in `block (3 levels) in process'

/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 `block in invoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/server/timeout.rb:11:in `block 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 `block 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 `block 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 `block in invoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/middleware/server/logging.rb:11:in `block 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 `block 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 `invoke'

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/processor.rb:42:in `block (2 levels) in process'

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

/usr/local/lib/ruby/gems/1.9.1/gems/sidekiq-2.5.4/lib/sidekiq/processor.rb:41:in `block in process'

/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 `block in initialize'

/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 `block in create'

4

1 回答 1

0

答案在这里找到。简单的 FQDN 问题。

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

编辑我的 /ets/hosts : 127.0.0.1 localhost.localdomain localhost

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

于 2013-04-17T09:25:36.203 回答