Commit 6d6f5e8
fix(deploy): widen health-check window past the truth-layer cold start (#321)
The #318/#320 image starts healthy but the deploy's health check gave up
before gunicorn bound :8000, taking prod down on a false negative.
entrypoint.sh builds the XBRL truth-layer DuckDB store BEFORE gunicorn forks
(~45s observed on the droplet), on top of collectstatic + Playwright verify.
The old check waited `sleep 30` + 3x5s (~45s) then failed -- and the journal
shows all 3 probes (08:26:16/:22/:27) ran BEFORE gunicorn even listened
(08:26:30). The container was fine; the window just raced the store build.
Widen to `sleep 10` + 24x5s (~130s, ~2.8x the measured cold start) and
succeed as soon as /health/ answers. Also dump `journalctl -n 80` on failure
so future startup regressions are diagnosable from the deploy log directly.
Not touching gunicorn: the "Control server error: Permission denied" (gunicorn
25.x control socket defaulting to /app/gunicorn.ctl under the root-owned CWD)
is non-fatal -- f86604d ran the identical gunicorn/config/user and served
fine. Silencing that control socket is a separate, lower-priority follow-up.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent aad7e3d commit 6d6f5e8
1 file changed
Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
228 | 235 | | |
229 | 236 | | |
230 | | - | |
| 237 | + | |
231 | 238 | | |
232 | 239 | | |
233 | | - | |
| 240 | + | |
234 | 241 | | |
235 | 242 | | |
236 | 243 | | |
237 | 244 | | |
238 | 245 | | |
| 246 | + | |
239 | 247 | | |
0 commit comments