-
Notifications
You must be signed in to change notification settings - Fork 100
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 to open inside the event loop (HA 2024.6) #382
Comments
Thanks for report and the links 👍 |
Beta 5 throws even more elaborate warnings (probably due to home-assistant/core#118620 being merged for b5), pasting them here for your reference:
|
Ill get create a fix for this this weekend. |
Tx. It's just a warning, component still works fine so no worries. |
Hello, how are you? had a look into init.py but don't know what to look for, thanks |
There's a link in the start post, and otherwise just wait for the next release. It's only a warning, nothing is broken. |
Thank you, I am trying to display 36 hours on an apex chart but it doesn't work, the chart says 'loading...' |
HA becomes unresposive with nordpool - using apexcharts-card in Default dashboard or openening a dashboard with noordpool in apexcharts-card: Core 2024.6.2 2024-06-13 21:14:14.097 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'nordpool' at custom_components/nordpool/init.py, line 158: tz=timezone("Europe/Stockholm"), (offender: /usr/local/lib/python3.12/site-packages/pytz/init.py, line 108: return open(filename, 'rb')), please create a bug report at https://github.com/custom-components/nordpool/issues |
Another effect of this issue is that it cause very high CPU loads, close to 100% load on one CPU. I was alerted of this issue when I noticed very high loads in HA which runs on a VM. After a bit of diagnostics, found it to be caused by the nordpool integration. I also have the notice in the logs "Detected blocking call to open inside the event loop by custom integration 'nordpool'". I'm running nordpool 0.14.0 on HA 2024.6.3 on supervisor 2024.06.0. |
This issue might be "only a warning", but it is actually holding up HA for quite some time and clogging up the logs with these warning messages. Hereby a link to the HA developer blog abut the issue and how to fix it: |
I created this pull request which looks up the timezone without blocking the event loop. There are some other blocking calls though, so this doesn't fix everything. |
Confirming that #383 fixes the issues. For those who wish to try as well: you need to install the Go to developer tools -> services and run the service: update.install
target:
entity_id: update.nordpool_update
data:
version: master |
I wanted to try but don't have |
Weird, it should be there if you installed through HACS? If you did install manually, just download the master branch and overwrite the files in edit: thinking of it, it could possible be an experimental feature of HACS (you can enable that in HACS) You can enable that in HACS configuration: go to your integrations page, click 'HACS' and click 'configure', it's the last checkbox |
I finally got to it and just updated it manually for now, blocking calls gone, so all good from my end. |
blocking calls are gone, but current price is not updating anymore. So not an improvement for me. |
That might be something local though, it works completely fine here. |
just saw that it was waiting for a reboot. Rebooting now. I am sure I already did a reboot, so not sure what is happening. |
Is the fix released? I see 0.0.14 from May as latest release? I have the loglines and price is not updating after 2024.6 update today. |
No, it's not released yet. I think that's something @Hellowlol needs to do. |
You can update to latest code through the steps in my previous comment.
That's unrelated though. The loglines are only warnings, there's nothing broken. |
Version of the custom_component
0.0.14
Homeassistant version
HA 2024.6.0b4
Describe the bug
Got a lot of warnings on 2024.6 beta (60+ lines) - see below
This might be related: https://developers.home-assistant.io/blog/2024/05/19/fix_zoneinfo_blocking_io/
Debug log
The text was updated successfully, but these errors were encountered: