gpt4 book ai didi

ruby-on-rails - 为什么 MailChimp 会出现间歇性 Excon::Errors::SocketError: EOFError (EOFError) 错误?

转载 作者:行者123 更新时间:2023-12-04 05:42:51 27 4
gpt4 key购买 nike

从 Rails 控制台使用 MailChimp gem 时出现间歇性错误。

这是错误:

Excon::Errors::SocketError: EOFError (EOFError)
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/openssl/buffering.rb:246:in `readline'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/excon-0.26.0/lib/excon/response.rb:39:in `parse'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/excon-0.26.0/lib/excon/middlewares/response_parser.rb:6:in `response_call'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/excon-0.26.0/lib/excon/connection.rb:349:in `response'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/excon-0.26.0/lib/excon/connection.rb:252:in `request'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/excon-0.26.0/lib/excon/connection.rb:290:in `post'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/mailchimp-api-2.0.3/lib/mailchimp.rb:40:in `call'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/mailchimp-api-2.0.3/lib/mailchimp/api.rb:861:in `member_info'
from (irb):5
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/railties-3.2.14/lib/rails/commands/console.rb:47:in `start'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/railties-3.2.14/lib/rails/commands/console.rb:8:in `start'
from /Users/me/.rvm/gems/ruby-1.9.3-p448@launchsoon/gems/railties-3.2.14/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

最佳答案

我在 Excon::Errors::SocketError: EOFError (EOFError) 上做了一些搜索,发现了 this carrierwave issue ,这似乎符合我的经验。

我能够重现此行为 - 如果我让我的控制台在那里坐一会儿,然后调用 MailChimp 的 API,它会失败一次并出现上述错误。如果我重试相同的调用,它会成功。

所以这个问题似乎是由于让套接字打开超过了保持事件的值。不幸的是,我不知道除了“不要那样做”之外的修复/解决方法。

关于ruby-on-rails - 为什么 MailChimp 会出现间歇性 Excon::Errors::SocketError: EOFError (EOFError) 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19030306/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com