On docker stop, runit sends SIGTERM to the app at the same moment as to smallwebwaf. An app that exits at once on SIGTERM leaves the requests in progress to fail with 502, so they do not get the five seconds the README describes.
Repro, with the image of next at 6fcbda6 and a test app that exits as soon as it gets SIGTERM: a request the app answers after 2 seconds, then docker stop half a second later. The client gets 502 from smallwebwaf after 0.5 seconds; its log line's action is upstream_error, and smallwebwaf logs request to the app failed with connection refused. With sv stop smallwebwaf alone, the same request finishes with 200, and one the app answers after 9 seconds is cut after 5, as documented.
README, "How it works, in short": "docker stop has runit stop both processes. smallwebwaf then stops taking requests and gives those in progress five seconds to finish." SPEC.md, "Deployment", says runit stops both services, each with SIGTERM, and says nothing of their order.
So the five seconds help only an app that finishes its requests in progress after SIGTERM. Neither document settles whether the app should be stopped after smallwebwaf, or whether the README should say that the app's own handling of SIGTERM decides.
Severity: minor. It touches only requests in progress during a stop, and only apps that exit at once on SIGTERM.
Model: opus-5-5
On `docker stop`, runit sends SIGTERM to the app at the same moment as to `smallwebwaf`. An app that exits at once on SIGTERM leaves the requests in progress to fail with `502`, so they do not get the five seconds the README describes.
Repro, with the image of `next` at `6fcbda6` and a test app that exits as soon as it gets SIGTERM: a request the app answers after 2 seconds, then `docker stop` half a second later. The client gets `502` from `smallwebwaf` after 0.5 seconds; its log line's `action` is `upstream_error`, and `smallwebwaf` logs `request to the app failed` with `connection refused`. With `sv stop smallwebwaf` alone, the same request finishes with `200`, and one the app answers after 9 seconds is cut after 5, as documented.
README, "How it works, in short": "`docker stop` has runit stop both processes. `smallwebwaf` then stops taking requests and gives those in progress five seconds to finish." SPEC.md, "Deployment", says runit stops both services, each with SIGTERM, and says nothing of their order.
So the five seconds help only an app that finishes its requests in progress after SIGTERM. Neither document settles whether the app should be stopped after `smallwebwaf`, or whether the README should say that the app's own handling of SIGTERM decides.
Severity: minor. It touches only requests in progress during a stop, and only apps that exit at once on SIGTERM.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On
docker stop, runit sends SIGTERM to the app at the same moment as tosmallwebwaf. An app that exits at once on SIGTERM leaves the requests in progress to fail with502, so they do not get the five seconds the README describes.Repro, with the image of
nextat6fcbda6and a test app that exits as soon as it gets SIGTERM: a request the app answers after 2 seconds, thendocker stophalf a second later. The client gets502fromsmallwebwafafter 0.5 seconds; its log line'sactionisupstream_error, andsmallwebwaflogsrequest to the app failedwithconnection refused. Withsv stop smallwebwafalone, the same request finishes with200, and one the app answers after 9 seconds is cut after 5, as documented.README, "How it works, in short": "
docker stophas runit stop both processes.smallwebwafthen stops taking requests and gives those in progress five seconds to finish." SPEC.md, "Deployment", says runit stops both services, each with SIGTERM, and says nothing of their order.So the five seconds help only an app that finishes its requests in progress after SIGTERM. Neither document settles whether the app should be stopped after
smallwebwaf, or whether the README should say that the app's own handling of SIGTERM decides.Severity: minor. It touches only requests in progress during a stop, and only apps that exit at once on SIGTERM.
Model: opus-5-5