Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeouts #8

Open
angerman opened this issue Sep 19, 2022 · 1 comment
Open

Timeouts #8

angerman opened this issue Sep 19, 2022 · 1 comment

Comments

@angerman
Copy link

Hi there! Thanks for building nix-serve-ng. If you permit, let me pick your brains a bit.
With nix-serve-ng, I'm seeing much less of

upstream timed out (110: Connection timed out) while reading response header from upstream

than I saw with nix-serve, where it was almost a constant stream of time outs.

Is there a way nix-serve-ng could report response times per request somehow? I'm not sure I fully trust nginx not to screw something up somewhere in the pipeline.

Another idea I had--though this might be completely misguided--is it possible that the sqlite database has too much contention? I would assume that reads are done concurrently. However if there are writes happening at the same time, and this means the DB blocks a read for a while, this might explain the time outs?

@Gabriella439
Copy link
Collaborator

I believe we do support per-request timeouts. See:

nix-serve-ng/src/Options.hs

Lines 132 to 141 in 5e0e4fb

parseTimeout :: Parser Natural
parseTimeout =
Options.option Options.auto
( Options.long "timeout"
<> Options.help "Timeout for requests"
<> Options.metavar "SECONDS"
-- nix-serve does not timeout requests, but warp insists on a
-- timeout, so we use the same default timeout as hydra
<> Options.value (10 * 60)
)

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

No branches or pull requests

2 participants