Move exception handling up the stack (avoid exit(1) in our composable functions)#19116
Merged
MadLittleMods merged 5 commits intodevelopfrom Nov 3, 2025
Merged
Conversation
exit(1))exit(1) in our composable functions)
MadLittleMods
commented
Oct 30, 2025
3 tasks
Contributor
Author
|
Thanks for the review @anoadragon453 🐏 (in time for RC tomorrow 🙏) |
MadLittleMods
added a commit
that referenced
this pull request
Nov 3, 2025
#19121) - Move `register_start` (calls `os._exit(1)`) out of `setup` (our composable function) - We want to avoid `exit(...)` because we use these composable functions in Synapse Pro for small hosts where we have multiple Synapse instances running in the same process. We don't want a problem from one homeserver tenant causing the entire Python process to exit and affect all of the other homeserver tenants. - Continuation of #19116 - Align our app entrypoints: `homeserver` (main), `generic_worker` (worker), and `admin_cmd` ### Background As part of Element's plan to support a light form of vhosting (virtual host) (multiple instances of Synapse in the same Python process) (c.f Synapse Pro for small hosts), we're currently diving into the details and implications of running multiple instances of Synapse in the same Python process. "Clean tenant provisioning" tracked internally by element-hq/synapse-small-hosts#48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move exception handling up the stack (avoid
exit(1)in our composable functions)Relevant to Synapse Pro for small hosts as we don't want to exit the entire Python process and affect all homeserver tenants.
Background
As part of Element's plan to support a light form of vhosting (virtual host) (multiple instances of Synapse in the same Python process) (c.f Synapse Pro for small hosts), we're currently diving into the details and implications of running multiple instances of Synapse in the same Python process.
"Clean tenant provisioning" tracked internally by https://github.com/element-hq/synapse-small-hosts/issues/48
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.