-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reorganize module forking to work around FIFO sched issues
On Node.js >= 20, the application may get stuck at 100% CPU usage on boot whenever its under the FIFO CPU scheduling policy. This has been isolated down to the node-redis library. tl;dr: prototype overriding on forked processes + FIFO is causing this, but it's most likely a Node.js bug rather than the dep's. While the source issue hasn't been fixed, module spawning (i.e.: process forking) has been re-organized to work around that issue: - Make module spawning sequential and synchronous. Start them one-by-one, failures means an application boot failure. - Add a configurable minimum delay between process forks. Default: 1s. See moduleSpawnDelayMs. - Change module start triggers to something realistic (i.e.: subprocess notifying that they're ready via IPC) The trade-off is that the boot sequence now takes longer. While this is a workaround, most of the changes are good nonetheless. Once the Node.js issue is fixed, the likely outcome is to reduce the spawn delay to 0.
- Loading branch information
1 parent
b6a74cf
commit 26dd64d
Showing
10 changed files
with
146 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ For previous changes, see the [release notes](https://github.com/bigbluebutton/b | |
|
||
* feat(livekit): sync screen share state with BBB | ||
* fix(core): onEvent is not a transaction, treat is as such | ||
* fix: reorganize module forking to work around FIFO sched issues | ||
* build: [email protected] | ||
* build: [email protected] | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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