-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Detected blocking call inside the event loop #1199
Comments
Thank you for opening this issue as well as your patience! Let me try to summarize my current understanding based upon the history referenced and my own investigation into the botocore loaders module. I also have a few clarifying questions for you. Is there an issue?I understand that there is a warning by Home Assistant about blocking calls in its What practical issues arise besides the warning in home assistant. Are there any negative effects? What can be done?If there are even any actual issues, mitigations or fixes may potentially be applied at Home Assistant, botocore and/or aiobotocore. Home Assistant@thehesiod has provided suggestions on pre-warming the model cache that could be implemented by Home Assistant. Has this been attempted? What other steps has Home Assistant taken to mitigate negative effects, if any? Does Home Assistant use long-living sessions or are they frequently recreated? botocoreAs @thehesiod stated, issues arising from botocore loaders are caused by their design, i.e. their reliance on file I/O and a large number of JSON files to be processed. The botocore teams seems to be aware of the situation, attempted optimisations in the past, but have not shared any plans on further redesigning that aspect of botocore. We can assume that botocore loaders will stay as they are for the foreseeable future. aiobotocoreWe already touched upon a few things that could be done by aiobotocore, including:
I hope this is a fair summary of the discussion so far and look forward to your responses. |
Describe the bug
Home Assitant recently added the ability to detect I/O function that block event loop:
After trying a first fix in #1120, I was redirected to botocore.
I opened a issue there: boto/botocore#3222, but was closed as botocore doesn't use event loop at all.
After some more discussions in the original PR, a new idea was raised and I applied it to a new fix in #1196.
Lately I was asked to open a issue to discuss the approach.
Checklist
pip check
passes without errorspip freeze
resultspip freeze results
pip_freeze.txt
Environment:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: