-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
GunicornWebWorker: spam logs every second in debug mode #712
Description
When I use GunicornWebWorker and enable asyncio debug mode (loop.set_debug(True)), I get messages like this logged nearly every second when the server is idle:
INFO:asyncio:poll 999.470 ms took 1001.159 ms: timeout
I investigated the issue, and seems that it will print such messages anytime if you call sleep(1) with delay of 1 second or more if no other IO happens during that delay.
GunicornWebWorker uses exactly 1 second for delay in idle mode: https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/worker.py#L97
And asyncio switches such messages from DEBUG to INFO loglevel when delay is >= 1 second: https://github.com/python/cpython/blob/master/Lib/asyncio/base_events.py#L1242
Is it possible to avoid such messages somehow, while leaving other asyncio diagnostic messages like ones about abandoned (not-called) subroutines?