Tôi đang sử dụng Mandrill-api trong Ruby để gửi email giao dịch theo chương trình.Mandrill-api Excon :: Lỗi :: SocketError
Tôi có (nhiều hơn hoặc ít hơn) dòng sau trong ứng dụng ray của tôi,
mandrill ||= Mandrill::API.new const(:API)[:MANDRILL_APIKEY]
... (constructing the message, content, etc)
mandrill.messages.send_template templ, template_content, message, true
Vấn đề là khi chạy trong sản xuất, nó sẽ trả về lỗi sau một lần trong một thời gian.
Excon::Errors::SocketError (EOFError (EOFError)):
app/mailers/mailer.rb:24:in `send'
....
Tôi không biết cách gỡ lỗi vấn đề này. Nếu ai đó có thể làm tôi sáng tỏ về cách tiếp cận để gỡ lỗi này, tôi đánh giá cao nó.
Gems Thông tin:
- giống phi phi-api (1.0.33)
- excon (0.16.10)
env sản xuất:
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
Chạy trên:
Máy chủ Apache: Apache /2.2.22 (Ubuntu)
hành khách: 3.0.14
Sẽ dễ dàng hơn nhiều nếu bạn có thể cung cấp một số thông tin về môi trường sản xuất của mình. – tyler
tyler, thêm env sản xuất. Hãy cho tôi biết nếu có thêm thông tin cụ thể để giúp gỡ lỗi. Cảm ơn. –