Skip to content

Use process supervisor with workers=1#2931

Open
eltoder wants to merge 1 commit intoKludex:mainfrom
eltoder:feature/one-worker-manager
Open

Use process supervisor with workers=1#2931
eltoder wants to merge 1 commit intoKludex:mainfrom
eltoder:feature/one-worker-manager

Conversation

@eltoder
Copy link
Copy Markdown
Contributor

@eltoder eltoder commented May 1, 2026

Summary

This enables process monitoring, so uvicorn will automatically restart the process if it dies or gets stuck, the same way as it does with multiple workers. Other features, like handling SIGHUP, SIGTTIN, SIGTTOU also work.

For cases where you don't need supervision, don't pass --workers. This is still the default.

Discussion: #2926

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • 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.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 1, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing eltoder:feature/one-worker-manager (4effe00) with main (ad5ff87)

Open in CodSpeed

This enables process monitoring, so uvicorn will automatically restart
the process if it dies or gets stuck, the same way as it does with
multiple workers. Other features, like handling SIGHUP, SIGTTIN, SIGTTOU
also work.

For cases where you don't need supervision, don't pass `--workers`. This
is still the default.
@eltoder eltoder force-pushed the feature/one-worker-manager branch from fad2caf to 4effe00 Compare May 1, 2026 13:32
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.

1 participant