Is there any documentation or best practices on managing processes, multiprocessing, subprocesses, threading, etc. with Python in Balena apps and services?

Is there any documentation or best practices on managing processes, multiprocessing, subprocesses, threading, etc. with Python in Balena apps and services?

I am managing a complicated app with multiple containers running. I’ve tested different type of multiprocessing and threading using python and I’ve seen many instances will processes will continue on after a container is killed. I am just looking for some deeper information on best practices for managing multiple python processes inside of docker/balenaOS containers or tools that might be available to make this easier and cleaner.

Thanks!

Hello @zswiftscience first of all, welcome to the balena community.

I’m not sure we do have any best practices here but i found this interesting conversation Increase the default maximum number of tasks for balenaEngine · Issue #1844 · balena-os/meta-balena · GitHub

Or this message in the forums → balenaOS 2.46.1+rev1 crashed with pthread_create failed: Resource temporarily unavailable - #14

Let me know if this is enough, if not please do share more details and we will try to help you more

Hi there, did you have a chance to look at the links Marc suggested? Were they of any help?