Commit cc21c11
Three root causes of the 10-second shutdown delay:
1. api-proxy Dockerfile used shell-form CMD (node runs under /bin/sh,
which doesn't forward SIGTERM to the child process). Switched to
exec form so node is PID 1 and handles signals directly.
2. Squid's default shutdown_lifetime (30s) causes it to wait for active
connections to drain. Added shutdown_lifetime 0 since this is an
ephemeral proxy with no need for connection draining.
3. Docker Compose default stop timeout is 10s. Added stop_grace_period
of 2s to squid and api-proxy services since they now shut down
promptly on SIGTERM.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 999f9a4 commit cc21c11
File tree
5 files changed
+30
-3
lines changed- containers/api-proxy
- src
5 files changed
+30
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
541 | 547 | | |
542 | 548 | | |
543 | 549 | | |
| |||
1789 | 1795 | | |
1790 | 1796 | | |
1791 | 1797 | | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
1792 | 1805 | | |
1793 | 1806 | | |
1794 | 1807 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
| |||
1238 | 1239 | | |
1239 | 1240 | | |
1240 | 1241 | | |
| 1242 | + | |
1241 | 1243 | | |
1242 | 1244 | | |
1243 | 1245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
571 | 580 | | |
572 | 581 | | |
573 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
609 | 613 | | |
610 | 614 | | |
611 | 615 | | |
| |||
0 commit comments