Opened 14 years ago
Closed 14 years ago
#7839 closed enhancement (fixed)
Add TCP keepalive to MythSocket connections
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - General | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Attached patch adds TCP keepalive to MythSocket? connections. Doing so ensures that idle sockets are closed after the connection is broken.
Two examples where keepalives allow Myth to recover gracefully: 1) Master backend has HW crash or reboot, and slaves never reconnect because their MBE sockets never closed. 2) Frontend watching LiveTV has HW crash or reboot, and backend never stops recording LiveTV because control socket never closed.
By default, keepalives start after 120 idle minutes, so recovery could take at least that long (Linux defaults add up to ~137 minutes). Keepalive timing is configurable but not in a consistent way across different platforms. For linux: http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html
Attachments (1)
Change History (2)
Changed 14 years ago by
Attachment: | 7839-tcp_keepalive.patch added |
---|
comment:1 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [23397]) Add TCP keepalive to MythSocket? connections. Patch from Jeff Lu with small modification suggested by Paul Kendall.
In summary, broken connections should now be closed gracefully after a system specific timeout. For improved usability the timeout should probably be reduced.
I think this should still be the fallback for broken connections - a complete solution would include a 'hearbeat' monitor between frontends/backends, as has been proposed before, that would detect broken connections in a timely manner (although, thinking about it, I'm not sure what additional functionality that provides!).
Closes #7839. See the original ticket for full details.