我在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。让我知道是否有其他特定信息帮助调试。谢谢。 –