Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GunicornWebWorker: spam logs every second in debug mode #712

Closed
MarSoft opened this issue Dec 28, 2015 · 2 comments
Closed

GunicornWebWorker: spam logs every second in debug mode #712

MarSoft opened this issue Dec 28, 2015 · 2 comments
Labels

Comments

@MarSoft
Copy link
Contributor

MarSoft commented Dec 28, 2015

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?

@fafhrd91
Copy link
Member

you can monkey patch GunicornWebWorker and use smaller delay

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants