fix(lapis): set a low timeout on calling SILO info so that the health endpoint doesn't block if SILO doesn't respond - #1593
Conversation
… endpoint doesn't block if SILO doesn't respond
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 I have created a release *beep* *boop* --- ## [0.7.2](v0.7.1...v0.7.2) (2026-03-16) ### Bug Fixes * **lapis:** set a low timeout on calling SILO info so that the health endpoint doesn't block if SILO doesn't respond ([#1593](#1593)) ([c501e9d](c501e9d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
callInfo() has had a hard-coded 100 ms request timeout since GenSpectrum#1593, picked so that the health endpoint cannot block when SILO does not respond. That same budget governs /sample/info, which deployments use as a readiness probe, so a SILO that is merely slow rather than down makes LAPIS report itself unhealthy and get taken out of service. Expose it as silo.infoTimeout, a Duration defaulting to 100ms, next to the existing silo.url. Nothing changes unless the property is set. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRvw1U8cSHWotT9kL5r8FC
callInfo() has had a hard-coded 100 ms request timeout since GenSpectrum#1593, picked so that the health endpoint cannot block when SILO does not respond. That same budget governs /sample/info, which deployments use as a readiness probe, so a SILO that is merely slow rather than down makes LAPIS report itself unhealthy and get taken out of service. Expose it as silo.infoTimeout, a Duration defaulting to 100ms, next to the existing silo.url. Nothing changes unless the property is set. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRvw1U8cSHWotT9kL5r8FC
callInfo() has had a hard-coded 100 ms request timeout since GenSpectrum#1593, picked so that the health endpoint cannot block when SILO does not respond. That same budget governs /sample/info, which deployments use as a readiness probe, so a SILO that is merely slow rather than down makes LAPIS report itself unhealthy and get taken out of service. Expose it as silo.infoTimeout, a Duration defaulting to 100ms, next to the existing silo.url. Nothing changes unless the property is set. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRvw1U8cSHWotT9kL5r8FC
corneliusroemer
left a comment
There was a problem hiding this comment.
This PR caused new flakes on Loculus CI because sometimes the info call does take longer than 100ms due to high load.
I understand that the LAPIS health endpoint should not stall when SILO blocks - but shouldn't this be handled in the health endpoint's call to this function here rather than the function itself?
A side-effect, and I don't think an intended one, is that now all callers to /sample/info get a 503 when this call takes >100ms. But there's nothing intrinsically wrong about taking >100ms - it can happen under load. Callers can set their own timeouts however they like, some might be happy to wait for a second but now they get a 503 instead.
Maybe moving where the timeout lives (to the caller that wants it) is better than #1866 (which is only a narrow workaround for the underlying problem - if my understanding above is correct).
The 100 ms timeout added in GenSpectrum#1593 sits on callInfo(), but only the health endpoint wants it. The same call also serves /sample/info, the once-a-second data version poll, and query parsing, and all of those inherit a budget that was never chosen for them: a SILO that is merely slow makes /sample/info fail rather than answer. Move the timeout to the caller that wants it. callInfo() takes an optional timeout, SiloHealthIndicator passes silo.healthCheckTimeout (default 100ms, so the health path is unchanged), and the other callers no longer carry a health check's deadline. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRvw1U8cSHWotT9kL5r8FC
I tested it locally by start SILO locally with a "sleep one minute" in the info endpoint.
PR Checklist
- [ ] All necessary documentation has been adapted.- [ ] All necessary changes are explained in thellms.txt.- [ ] The implemented feature is covered by an appropriate test.