Files
floci/docs
TATSUNO “Taz” Yasuhiro c8de16ffc7 fix(lambdaweb): never run a request twice when the app crashes (#5842)
* fix(lambdaweb): retry a failed request only when Floci saw the exit before sending it

A request that found its environment dead was retried when Docker's exit
time came before the request start. Docker takes that time from the
daemon's clock, which can be seconds behind Floci's. So a request the app
had received could run a second time. Docker also reports an exit late
under load. Until then the dead environment stayed in the pool, and the
next request got a 503 too.

Floci now follows each environment with an attach stream. The stream ends
when the process exits, and Floci notes the time on its own clock. A
failed request waits for that, up to one second. It is retried only if
the exit came before it was sent. Otherwise it gets the 503 page after
the dead environment has left the pool.

* docs(lambdaweb): note the short window after an exit in the 503 row

* fix(lambdaweb): clean up an exited environment off the reaper thread

Docker can take seconds to report an exit status under load. On the
reaper this held up the rearm of dropped exit watches and the idle checks.

* test(lambdaweb): wait for Floci to see the exit instead of polling for the container
2026-10-16 21:44:24 -04:00
..
2026-03-15 17:43:56 -05:00