Skip to content

Handle the out of Memory error by counting subsequent timeouts - keep alive - Implement ConnectionError#22

Open
jakob1911 wants to merge 9 commits into
OnFreund:masterfrom
jakob1911:master
Open

Handle the out of Memory error by counting subsequent timeouts - keep alive - Implement ConnectionError#22
jakob1911 wants to merge 9 commits into
OnFreund:masterfrom
jakob1911:master

Conversation

@jakob1911
Copy link
Copy Markdown

@jakob1911 jakob1911 commented Jun 27, 2024

Hello OnFreund,

i tested a few things regarding the "out of Memory error" home-assistant/core#119138 over the last weeks, just right before you updated your repository -- in fact i came a bit late with this now :)

I don´t know if my changes would fit your standard. But in fact it solves the problem with out of memory in my case compleatly.
(i´m using pyrisco with HomeAssistant in local) !

  • Created parameter "max_timeout_keep_alive_subseq" in pyrisco
    --> If a "Timeout CLOCK" happens 3 times subseqently, i´m raising an error "ConnectionError"
    In my test together with HomeAssistant Integration i checking for the error the same way you do for "ConnectionResetError" (init_.py) and starting a reload of the Integration when "ConnectionError" is raised by pyrisco.

I would be happy if you can take parts of my changes for everyone´s needs.

Best regards

Jakob

@rhalutz
Copy link
Copy Markdown

rhalutz commented May 24, 2026

Hi @jakob1911 — cross-linking #44, which I just opened against the same class of symptom (CLOCK keep-alive timing out repeatedly after the panel drops the session).

The two PRs take different angles:

Posting so @OnFreund has both visible side-by-side and can pick whichever framing fits best. Not trying to step on your PR — happy to defer or close mine if the maintainer prefers the timeout-counting approach.

@OnFreund
Copy link
Copy Markdown
Owner

Thanks @rhalutz. I like your approach better - I'll try to review in the next few days. One thing that did pop out in a cursory look is OSError which I think is casting a pretty wide net, and I'd prefer something more specific. I'll review more thoroughly and we'll continue the conversation there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants