I am using sidekiq to send mails through Mandrill Apis. It was working all fine. But from past few days I am receiving timeout errors in sidekiq while job try to deliver mail randomly.
Excon::Errors::Timeout: connect timeout reached
I am unable to find the actual cause of this error. I am using
- ruby '2.1.1'
- sidekiq '3.5.0'
- mandrill_mailer '1.1.0'
- mandrill-api '1.0.53'
Here is the complete error
2017-01-11T17:34:06.068Z 3690 TID-otkzvfo0c WARN: Excon::Errors::Timeout: connect timeout reached
2017-01-11T17:34:06.068Z 3690 TID-otkzvfo0c WARN: /home/shared/bundle/ruby/2.1.0/gems/excon-0.45.4/lib/excon/socket.rb:139:in `rescue in block in connect'
/home/shared/bundle/ruby/2.1.0/gems/mandrill-api-1.0.53/lib/mandrill.rb:35:in `call'
/home/shared/bundle/ruby/2.1.0/gems/mandrill-api-1.0.53/lib/mandrill/api.rb:921:in `send_template'
/home/shared/bundle/ruby/2.1.0/gems/mandrill_mailer-1.1.0/lib/mandrill_mailer/template_mailer.rb:121:in `deliver'
/home/app/mailers/sub_request_mailer.rb:651:in `sub_request_approved_location'
/home/shared/bundle/ruby/2.1.0/gems/mandrill_mailer-1.1.0/lib/mandrill_mailer/core_mailer.rb:290:in `call'
/home/shared/bundle/ruby/2.1.0/gems/mandrill_mailer-1.1.0/lib/mandrill_mailer/core_mailer.rb:290:in `method_missing'
0.45.4 is a somewhat older version of excon (newest is 0.54.0). Updating that should be safe and would be a good next step to reduce the possible causes.