{"record":{"id":"7d0383eca537356a","repo":"ruby/rubygems","slug":"too-many-connection-resets","errorCode":null,"errorMessage":"too many connection resets","messagePattern":"too many connection resets","errorType":"exception","errorClass":"Gem::RemoteFetcher::FetchError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/request.rb","lineNumber":254,"sourceCode":"\n      raise Gem::RemoteFetcher::FetchError.new(\"too many bad responses\", @uri) if bad_response\n\n      bad_response = true\n      retry\n    rescue Gem::Net::HTTPFatalError\n      verbose \"fatal error\"\n\n      raise Gem::RemoteFetcher::FetchError.new(\"fatal error\", @uri)\n    # HACK: work around EOFError bug in Gem::Net::HTTP\n    # NOTE Errno::ECONNABORTED raised a lot on Windows, and make impossible\n    # to install gems.\n    rescue EOFError, Gem::Timeout::Error,\n           Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE\n\n      requests = @requests[connection]\n      verbose \"connection reset after #{requests} requests, retrying\"\n\n      raise Gem::RemoteFetcher::FetchError.new(\"too many connection resets\", @uri) if retried\n\n      reset connection\n\n      retried = true\n      retry\n    end\n\n    response\n  ensure\n    @connection_pool.checkin connection\n  end\n\n  ##\n  # Resets HTTP connection +connection+.\n\n  def reset(connection)\n    @requests.delete connection\n","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/request.rb#L236-L272","documentation":"Error \"too many connection resets\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/request.rb:254 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry later; the server repeatedly reset the connection","Check network/proxy stability or use a different mirror"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}