aio-libs / aio-libs/aiohttp

ConnectionResetError being output in normal, expected situations

Abierto
#3,178 20 comentarios 6 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
16.5k
Forks
2.4k
Merge medio
17 h 22 min
PR fusionados (30 d)
212

Descripción

## Long story short

I am frequently seeing this message output from the aiohttp library.

Traceback (most recent call last):
File "/usr/local/lib64/python3.6/site-packages/aiohttp/web_protocol.py", line 398, in start
await resp.prepare(request)
File "/usr/local/lib64/python3.6/site-packages/aiohttp/web_response.py", line 300, in prepare
return await self._start(request)
File "/usr/local/lib64/python3.6/site-packages/aiohttp/web_response.py", line 605, in _start
return await super()._start(request)
File "/usr/local/lib64/python3.6/site-packages/aiohttp/web_response.py", line 367, in _start
await writer.write_headers(status_line, headers)
File "/usr/local/lib64/python3.6/site-packages/aiohttp/http_writer.py", line 100, in write_headers
self._write(buf)
File "/usr/local/lib64/python3.6/site-packages/aiohttp/http_writer.py", line 57, in _write
raise ConnectionResetError('Cannot write to closing transport')
ConnectionResetError: Cannot write to closing transport

## Expected behaviour

The library should automatically recover itself internally, or throw an error where my application code can handle it with a retry.

## Actual behaviour

This error comes out in my logs and causes error detection systems to trigger.

## Steps to reproduce

I don't fully understand how to reproduce it, but it happens frequently in my application that uses aiohttp as a client. The library seems to recover from it.

## Your environment

aiohttp (3.1.3) client on Fedora relesae 27, Python 3.6.4.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.