我在Ruby中使用Mandrill-api以編程方式發送事務性電子郵件。Mandrill-api Excon :: Errors :: SocketError
我在我的Rails應用程序(或多或少)以下行,
mandrill ||= Mandrill::API.new const(:API)[:MANDRILL_APIKEY]
... (constructing the message, content, etc)
mandrill.messages.send_template templ, template_content, message, true
的問題是在生產環境中運行時,它在一段時間返回以下錯誤一次。
Excon::Errors::SocketError (EOFError (EOFError)):
app/mailers/mailer.rb:24:in `send'
....
我不知道如何調試此問題。如果有人能夠闡明調試方法,我非常感謝。
寶石信息:
- 山魈-API(1.0.33)
- EXCON(0.16.10)
生產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
運行在:
Apache服務器:Apache /2.2.22(Ubuntu的)
乘客:3.0.14
如果您可以提供有關您的生產環境的信息,那將會更容易。 – tyler
泰勒,增加生產env。讓我知道是否有其他特定信息幫助調試。謝謝。 –