I am using Mandrill-api in Ruby to programmatically send out transactional email.
I have (more or less) the following line in my rails app,
mandrill ||= Mandrill::API.new const(:API)[:MANDRILL_APIKEY]
... (constructing the message, content, etc)
mandrill.messages.send_template templ, template_content, message, true
The problem is when running in production, it returns the following error once in a while.
Excon::Errors::SocketError (EOFError (EOFError)):
app/mailers/mailer.rb:24:in `send'
....
I have no idea how to debug this issue. If somebody could shed me light on the approach for debugging this, I highly appreciate it.
Gems Info:
- mandrill-api (1.0.33)
- excon (0.16.10)
Production env:
sudo bundle exec rake RAILS_ENV=production about
About your application's environment
Ruby version 1.9.3 (x86_64-linux)
RubyGems version 1.8.11
Rack version 1.4
Rails version 3.2.13
Active Record version 3.2.13
Action Pack version 3.2.13
Active Resource version 3.2.13
Action Mailer version 3.2.13
Active Support version 3.2.13
Middleware Rack::Cache, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x00000001e72330>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport
Environment production
Database adapter mysql2
Running on:
Apache Server: Apache/2.2.22 (Ubuntu)
Passenger: 3.0.14