Skip to content

fix(lapis): set a low timeout on calling SILO info so that the health endpoint doesn't block if SILO doesn't respond - #1593

Merged
fengelniederhammer merged 1 commit into
mainfrom
infoTimeout
Mar 16, 2026
Merged

fix(lapis): set a low timeout on calling SILO info so that the health endpoint doesn't block if SILO doesn't respond#1593
fengelniederhammer merged 1 commit into
mainfrom
infoTimeout

Conversation

@fengelniederhammer

@fengelniederhammer fengelniederhammer commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

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 the llms.txt.
- [ ] The implemented feature is covered by an appropriate test.

… endpoint doesn't block if SILO doesn't respond
@fengelniederhammer fengelniederhammer self-assigned this Mar 12, 2026
@vercel

vercel Bot commented Mar 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lapis Ready Ready Preview, Comment Mar 12, 2026 8:37am

Request Review

@fengelniederhammer
fengelniederhammer marked this pull request as ready for review March 12, 2026 10:47

@fhennig fhennig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me!

@fengelniederhammer
fengelniederhammer merged commit c501e9d into main Mar 16, 2026
11 checks passed
@fengelniederhammer
fengelniederhammer deleted the infoTimeout branch March 16, 2026 07:49
fengelniederhammer pushed a commit that referenced this pull request Mar 17, 2026
🤖 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>
corneliusroemer-agent added a commit to corneliusroemer-agent/LAPIS that referenced this pull request Sep 10, 2026
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-agent added a commit to corneliusroemer-agent/LAPIS that referenced this pull request Sep 10, 2026
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-agent added a commit to corneliusroemer-agent/LAPIS that referenced this pull request Sep 10, 2026
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 corneliusroemer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

corneliusroemer-agent added a commit to corneliusroemer-agent/LAPIS that referenced this pull request Sep 10, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants