ateodorescu / home-assistant-ipmi

IPMI connector for Home Assistant
MIT License
36 stars 8 forks source link

Sensors become unavailable with error "Timeout fetching IPMI resource status data" #2

Closed 35gh closed 10 months ago

35gh commented 1 year ago

It seems that all sensors are becoming unavailable roughly every 2 minutes for 10 seconds. Example:

Capture d’écran 2023-06-21 à 13 02 05
ateodorescu commented 1 year ago

Sensor values are fetched every 10 seconds or the value configured for the server (check the configure button). Screenshot 2023-06-21 at 14 10 46

Not sure why you see that gap.

35gh commented 1 year ago

I see this error in the logs:

 Logger: custom_components.ipmi
Source: helpers/update_coordinator.py:229
Integration: IPMI connector (documentation)
First occurred: 12:56:16 (11 occurrences)
Last logged: 13:22:06
Timeout fetching IPMI resource status data
35gh commented 1 year ago

I've increased async_timeout value in 'init.py' from 10 to 20 and it has drastically reduced the occurrence of timeouts. Line 84, from: async with async_timeout.timeout(10): to: async with async_timeout.timeout(20):

I got one timeout during the night, I have further increased the value to 25 and retesting now to see if I can get rid of them completely.

35gh commented 1 year ago

Even with 25 or 30, I'm still getting some timeouts from time to time. It may be useful to implement a logic that if a timeout occurs, previous values are used until next retry (then fails if retry is unsuccessful).

ateodorescu commented 10 months ago

https://github.com/ateodorescu/home-assistant-ipmi/releases/tag/v1.1.1