Skip to content

Not all connections are closed (pending: 0) #523

@ikhlestov

Description

@ikhlestov

I've receive very strange error message during usual closing connection:
loop.run_until_complete(handler.finish_connections(1.0))
like:

WARNING:aiohttp.web:Not all connections are closed (pending: 0)

Can you advise how is this possible?
I've checked RequestHandlerFactory.finish_connections method and found that inside cleanup() coroutine method self._connections still exists:

Connections in cleanup method: {<RequestHandler GET:/signal_socket connected>: <_SelectorSocketTransport fd=8 read=polling write=<idle, bufsize=0>>}
Sleep: 0.05
Connections in cleanup method: {<RequestHandler GET:/signal_socket connected>: <_SelectorSocketTransport fd=8 read=polling write=<idle, bufsize=0>>}
Sleep: 0.1
Connections in cleanup method: {<RequestHandler GET:/signal_socket connected>: <_SelectorSocketTransport fd=8 read=polling write=<idle, bufsize=0>>}
Sleep: 0.2
Connections in cleanup method: {<RequestHandler GET:/signal_socket connected>: <_SelectorSocketTransport fd=8 read=polling write=<idle, bufsize=0>>}
Sleep: 0.4

But at except statement - not:

Connections at except asyncio.TimeoutError statement: {}

I cannot say more because I not very familiar with asyncio at this moment. But I hope this will help you someway.
I use Python 3.5.0 and pyenv. And default WebSocketResponse the same as from tutorial.
If this bug is unreasonable please sorry but I don't know another place to report it and it my first bug report.
UPD: It seems if change timeout90 = timeout / 100 * 90 to lower one, for example timeout90 = timeout / 100 * 70 all works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions