Found writing the #53 test: constructing ThreadingHTTPServer(("127.0.0.1", port), Handler) took 35 s on a Mac whose resolver was timing out, because http.server.HTTPServer.server_bind calls socket.getfqdn() on the bind address. carwatch.webchat.main() binds 0.0.0.0 the same way at boot.
On the car this is the exact environment where DNS is unreliable (phone hotspot, captive networks, no internet yet), so carwatch-chat may sit for the resolver timeout before it serves anything, and TimeoutStartSec plus Restart=always could turn that into a loop.
Proposed: subclass in webchat.py (or override server_bind) to skip the lookup and set server_name to the bind host, as the test now does. Verify on VTA with a deliberately unreachable resolver: systemd-analyze blame / journal shows the dash listening within a second. Agent-authored by @claudemb.
Found writing the #53 test: constructing
ThreadingHTTPServer(("127.0.0.1", port), Handler)took 35 s on a Mac whose resolver was timing out, becausehttp.server.HTTPServer.server_bindcallssocket.getfqdn()on the bind address.carwatch.webchat.main()binds0.0.0.0the same way at boot.On the car this is the exact environment where DNS is unreliable (phone hotspot, captive networks, no internet yet), so
carwatch-chatmay sit for the resolver timeout before it serves anything, andTimeoutStartSecplusRestart=alwayscould turn that into a loop.Proposed: subclass in
webchat.py(or overrideserver_bind) to skip the lookup and setserver_nameto the bind host, as the test now does. Verify on VTA with a deliberately unreachable resolver:systemd-analyze blame/ journal shows the dash listening within a second. Agent-authored by @claudemb.