Missing per-request timeout for Git LFS chunk transfers in Forgejo
0 reputation · 19 Nov 2023, 22:22 UTC
The goal is to bound Git LFS uploads with a server‑side timeout so stalled connections do not consume resources indefinitely.
Forgejo already propagates request‑level context.Context to HTTP handlers and honors SERVER_TIMEOUT and WEBHOOK_TIMEOUT, but the LFS chunk transfer handler does not respect these limits; there is no dedicated configuration option for LFS timeouts, and it is unclear whether adding one would require changes to the LFS protocol handling or middleware.
Is there a plan to expose a LFS_TIMEOUT setting in app.ini? Would implementing per‑request context cancellation for LFS transfers interfere with existing LFS client expectations? What impact could a server‑side LFS timeout have on mirroring or other LFS‑related background jobs?