uvicorn icon indicating copy to clipboard operation
uvicorn copied to clipboard

feat: max_requests_jitter

Open jonashaag opened this issue 3 months ago • 1 comments

Summary

Implement --max-requests-jitter that works the same way as in Gunicorn (https://docs.gunicorn.org/en/stable/settings.html#max-requests-jitter).

Ref: https://github.com/Kludex/uvicorn/issues/574

Help wanted: The test I've added seems to be flaky: Sometimes caplog.txt == "" and I don't understand why.

Checklist

  • [x] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [ ] I've updated the documentation accordingly.

jonashaag avatar Sep 22 '25 18:09 jonashaag

@Kludex I think this ready to review.

The failing test seems flaky (last time I ran it, a different test failed)

jonashaag avatar Sep 29 '25 11:09 jonashaag