Skip to content

fix(api): Increase Pyro5 daemon thread pool to account for maintenance runs and multiple modules#21734

Merged
CaseyBatten merged 1 commit into
edgefrom
thread_pool_bump
Jun 12, 2026
Merged

fix(api): Increase Pyro5 daemon thread pool to account for maintenance runs and multiple modules#21734
CaseyBatten merged 1 commit into
edgefrom
thread_pool_bump

Conversation

@CaseyBatten

@CaseyBatten CaseyBatten commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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)

  • Gripper calibration
  • Pipette calibration
  • Temp deck calibration
  • Heater shaker calibration
  • Thermocycler calibration
  • Absorbance reader calibration
  • Flex stacker calibration

Protocol run tests:

  • Run the full module concurrency protocol and ensure it completes without a no free workers threadpool error

Changelog

Bumped the threadpool maximum for the pyro daemon of each process up to 200.

Review requests

Risk assessment

Low

@CaseyBatten CaseyBatten requested a review from jbleon95 June 12, 2026 14:55

@sfoster1 sfoster1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes sense to me, nice!

@CaseyBatten CaseyBatten merged commit 0c3f52e into edge Jun 12, 2026
59 checks passed
@CaseyBatten CaseyBatten deleted the thread_pool_bump branch June 12, 2026 15:38
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.

2 participants