Skip to content

Cleanup errors are silenced by gunicorn worke #3464

Closed
@ods

Description

GunicornWebWorker explicitly suppresses all exceptions when calling _run method. Thus any exception in on_cleanup handler passes silently and farther handlers of the signal (if any) are not called.

There is a plenty of places in aiohttp probably with the same problem:

$ grep --include='*.py' -nF 'with suppress(Exception)' -R aiohttp
aiohttp/client_proto.py:70:            with suppress(Exception):
aiohttp/connector.py:139:            with suppress(Exception):
aiohttp/helpers.py:464:        with suppress(Exception):
aiohttp/helpers.py:517:            with suppress(Exception):
aiohttp/web_protocol.py:518:                with suppress(Exception):
aiohttp/worker.py:71:        with suppress(Exception):  # ignore all finalization problems

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions