Skip to content

proxy: Add detection for stale/broken TCP connections - #724

Open
hlchau wants to merge 1 commit into
johanmeijer:masterfrom
hlchau:f-proxy-tcp-timeout-detection
Open

proxy: Add detection for stale/broken TCP connections#724
hlchau wants to merge 1 commit into
johanmeijer:masterfrom
hlchau:f-proxy-tcp-timeout-detection

Conversation

@hlchau

@hlchau hlchau commented Jun 29, 2026

Copy link
Copy Markdown

Consider TCP connections as broken after user-specified time of no transmissions (currently set to 5 minutes) and closes the respective proxy socket pair from inverter to the growatt server.

This is required for some environments (such as docker), where the grott proxy will simply not receive any data from the growatt inverter anymore.

Consider TCP connections as broken after user-specified time of no
transmissions (currently set to 5 minutes) and closes the respective
proxy socket pair from inverter to the growatt server.

This is required for some environments (such as docker), where the
grott proxy will simply not receive any data from the growatt inverter
anymore.
@hlchau

hlchau commented Jun 29, 2026

Copy link
Copy Markdown
Author

Some more explanation of the effects of a stale connection over multiple days:

As grott is not able to detect any remotely closed TCP connections, the list of sockets monitored by select() will grow over time. After approx. 3 days, select() strangely fails to detect new incoming TCP connections coming from the growatt box... As a consequence, no data is received from the inverter anymore until grott is restarted.

FWIW: I am not sure why select() fails to work properly, probably it's related to my setup, where grott is running in a docker container.

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.

1 participant