question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Detected I/O inside the event loop

See original GitHub issue

Environment Home-Assistant version: 0.109.3 Elasticsearch version: 0.2.2

Describe the bug

I new warning was introduced in HASS 0.109 when I/O it performed within event loop. Getting the following warning:

WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for elastic doing I/O at custom_components/elastic/__init__.py, line 512: bulk_response = bulk(self._gateway.get_client(), actions)

To Reproduce Steps to reproduce the behavior: Startup HASS and wait, the WARNING log messages will be produced.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JZ-SmartThingscommented, May 26, 2020

@legrego it works very well. Still getting my state changes in ES and the HA log is clean. @mloebl I wish it made my HA faster 😄

As a side note, every time I restart HA, it dumped every single state into ES and the bar chart looked super tall for my automation chart. This update stopped this behavior and now the HA restarts don’t dump all states. Thanks again @legrego!!!

1reaction
eloeblcommented, May 26, 2020

@legrego It works very well, took a bit for me to get the proper beats build environment running initially, but built it against 7.6.2 a few weeks back and has been stable with HS3 and now HS4 Beta. I stood up my first simple 2 node elastic cluster a couple months ago at my house, and I am loving it. Between being about to bring in the system logs, firewall/surciatanet/netflow logs, and now my HS/HA logs, it’s a great single location to track what’s going on with my home network. We’re staging up another Elasticstack at work, and I suspect we’ll be installing this on the HA system there as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Detected I/O inside the event loop · Issue #232 - GitHub
In HomeAssistant 0.109.0b0 I have the folowing warning: Log Details (WARNING) Logger: homeassistant.util.async_. Source: util/async_.py:120
Read more >
Detected i/o inside the event loop - Home Assistant Community
I'm using the abandoned gtask custom component since there's no todo lists integration. I'm having the following warning making it quite ...
Read more >
The event loop - JavaScript - MDN Web Docs - Mozilla
JavaScript has a runtime model based on an event loop, which is responsible for executing the code, collecting and processing events, ...
Read more >
Event Loop — Python 3.11.1 documentation
Event loops run asynchronous tasks and callbacks, perform network IO operations, and run subprocesses. Application developers should typically use the high- ...
Read more >
What is the difference between the event loop in JavaScript ...
The event loop is the mechanism. Asynchronous I/O is the goal. Asynchronous I/O is a style of programming in which I/O calls do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found