You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spurious ERROR log lines on normal SIGTERM shutdown of reflex run (granian "Unexpected exit from worker-1"; "Starting frontend failed with exit code 143") #6981
A perfectly normal SIGTERM shutdown of a dev reflex run produces ERROR-level log records, which is noise that pollutes captures, alerting, and log-based CI checks:
granian logs [ERROR] Unexpected exit from worker-1 — timing-dependent: some shutdowns produce the clean Shutting down granian / Stopping worker-1 / Stopped worker-1 sequence, others the spurious ERROR.
reflex itself logs Starting frontend failed with exit code 143 followed by a frontend log dump: 143 (SIGTERM) is not in the accepted return codes for the frontend process — only SIGINT/130 is — so a SIGTERM teardown of the frontend child is reported as a startup failure.
To Reproduce
reflex init --template blank
reflex run --frontend-port 3000 --backend-port 8000 > run.log 2>&1&# wait for the app to come up, then:kill -TERM %1
grep -n "ERROR\|failed" run.log
Repeat a few times; the granian ERROR appears on a large fraction of shutdowns (timing-dependent), the exit-code-143 ERROR reliably when the frontend child is torn down by the signal.
Observed behavior
ERROR-level records during an orderly, user-requested shutdown.
Expected behavior
A normal SIGTERM shutdown logs nothing above INFO: worker teardown should be sequenced so granian does not classify it as unexpected (or the message downgraded), and 143/SIGTERM should join 130/SIGINT in the accepted frontend exit codes.
Specifics (please complete the following information):
Python Version: 3.11
Reflex Version: 0.9.9a1
OS: linux
Additional context
Severity: low (cosmetic noise). Not a regression — both behaviors reproduce identically on 0.9.8.
Found during 0.9.9a1 pre-release testing; server logs showing both shapes (and the clean-shutdown variant) are on branch claude/reflex-prerelease-testing-t0sd90 under prerelease-testing/2026-08-27-v0.9.9a1/state_concurrency/ and prerelease-testing/2026-08-27-v0.9.9a1/logging_cli/.
Activity
linear-code commentedon Aug 28, 2026
ENG-11820
fix(processes): accept a SIGTERM teardown of the frontend as a clean …