fix(api): Increase Pyro5 daemon thread pool to account for maintenance runs and multiple modules#21734
Merged
Conversation
… many-moduled setups
sfoster1
approved these changes
Jun 12, 2026
sfoster1
left a comment
Member
There was a problem hiding this comment.
this makes sense to me, nice!
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.
Overview
Covers RQA-5576, RQA-5603, RQA-5608, RQA-5594
When a Flex is setup with lots of modules, a lot more requests are made and handled by each of the processes. On top of this, maintenance runs are run as part of the robot server, not as part of a separate process, so the robot server inherits all the pyro outbound and inbound requests that would have been under a separate process before. This means our original threadpool overhead of 100 for the daemon server was not enough.
Some testing was done on runs before and after this change. Throughout different situations (calibration flows, normal runs) a fully decked-out Flex (Modules in every slot) was seeing a range from as low as 20 to as high as 150 sockets opening and closing on the robot server process at different times. The hardware api process was seeing a range from 14 to 105 during spikes. The threadpool was doubled to 200 (meaning each process can handle up to 200 inbound requests at the same time) to give us a reasonable overhead to ensure we can continue to operate, even under spike scenarios.
Test Plan and Hands on Testing
Calibration tests (on a fully decked out Flex)
Protocol run tests:
no free workersthreadpool errorChangelog
Bumped the threadpool maximum for the pyro daemon of each process up to 200.
Review requests
Risk assessment
Low