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

Do all async operations in the same task in gunicorn workers #3466

Closed
asvetlov opened this issue Dec 25, 2018 · 3 comments
Closed

Do all async operations in the same task in gunicorn workers #3466

asvetlov opened this issue Dec 25, 2018 · 3 comments

Comments

@asvetlov
Copy link
Member

Like we do for web.run_app() already.

The reason is: on every loop.run_until_complete() a new contextvars context copy is created (and deleted on task exit).
It leads to the situation when context var changed on app.on_startup() stage is not visible in web-handler etc.

P.S.
The fix worth to be backported to 3.5

@aio-libs-bot
Copy link

GitMate.io thinks possibly related issues are #1196 (Additional handler params for gunicorn worker ), #269 (Worker is broken with latest Gunicorn), #458 ([bug] Gunicorn worker logs are incorrect), #2033 (Support application coroutine factory in web.run_app and gunicorn worker.), and #705 (access log format is invalid when using gunicorn worker).

@asvetlov
Copy link
Member Author

asvetlov commented Jan 3, 2019

Fixed by #3471

@asvetlov asvetlov closed this as completed Jan 3, 2019
@lock
Copy link

lock bot commented Jan 4, 2020

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 Jan 4, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants