Open SyntaxColoring opened 3 years ago
I am pretty sure that this is caused by a ThreadManager
thread leak as a result of robot_server.service.protocol.analyze._simulate_protocol
.
Relates to #7302
Broadening the scope of this issue since it doesn't seem specific to the HTTP API.
[This issue was originally written in reference to the beta HTTP API, but it's probably an issue even if you're just uploading protocols through the v4.x Opentrons App like normal.]
Overview
If you upload and run protocols over and over again through the beta HTTP API, the OT-2 will eventually start returning internal errors that suggest it has run out of threads.
This ticket is adapted from a report from Declan Jones, an HTTP API beta tester. (Thank you!)
Steps to reproduce
Run an infinite loop based on the HTTP API beta example code that:
Current behavior
Around the 68th run, you will start to get
RuntimeError
s like:Expected behavior
Since you clean up the protocol and session resources properly, you should be able to run protocols infinitely without hitting this threading error.