Hi
I have a complete python program running and working correctly on RPI4 CM using IO Board. The program establishes a connection with an AMQP Broker and receives messages from the broker to control several peripherals and send back to the broker messages with different sensor values. The program uses 3 threads: Main, AMQP_Consumer and AMQP_Producer and the data between the Threads uses queues and all necessary resource management such as semaphores. Once again everything works correctly in rpi and the problems start when I try to integrate the program with Balena.
I have been evaluating Balena as a fleet management system to see if it meets our customers’ needs, as we aim to produce up to 100 devices this year and more next year. However, although I was able to configure everything correctly, it seems that the container running the python program doesn’t handle threads very well. The device logs in the Balena Dashboard show that the program is able to establish the AMQP connection to the broker, start the AMQP_Consumer and AMQP_Producer threads, but then it stops working correctly and it appears that the device is only able to run the AMQP_Consumer thread since he receives messages from the broker and not do any work in the Main and AMQP_Producer threads.
Are there any known issues with Balena OS and containers related to the handling of Threads?
Best regards.