私たちのコードは、過去数時間からherokuサーバーで例外を生成しています. それ以前は、同じサーバーで同じコードを使用して問題なく動作していました。
例外はErrno::ECONNRESET (Connection reset by peer - SSL_connect)
herokuサーバーです。
例外が発生しているコード行は次のとおりです。
response = http.request(request, json_data)
この例外の考えられる理由/解決策は何ですか?
def self.get_response_from_v2(url,json_data)
http = Net::HTTP.new(url.host, 443)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url.path, {'Content-Type' => 'application/json'})
request.basic_auth url.user, url.password if url.user
response = http.request(request, json_data)
result = JSON.parse(response.body)
result
end
解決策を試しました: