Balena “Supervisor” process does not restart after reboot / shutdown / powerloss

Hi @Seva,

Unfortunately, you faced an issue when the containers engine does not start in the allocated timeframe and gets into a restart loop.
Let me explain this a bit.

The containers engine is started as a system service and its configuration has a startup timeout (90 sec atm). The engine completes its startup procedure on boot once it loads all the previously started containers. So this operation basically takes O(N) time, where N is the number of containers. Loading a container also involves disk write operations (because the engine needs to serialize the new containers state).
For many devices, time spent per container is really small, and 90 seconds is more than enough. However, on devices like Raspberry Pi Zero, it may become a problem because the startup procedure takes longer, and the more container you have, the higher chance is you will hit the timeout.

balenaSense has 5 containers, and when the supervisor rebooted the device to finish a new device config application, the engine got into the restart loop because it was not able to complete the startup in the allocated 90 seconds.

We are actively discussing the setup in a related balenaOS github issue:


And this thread will be updated once we have a resolution.

For now, I updated the service config on your device manually to mitigate the problem. However, keep in mind that this change will not survive the OS update.

1 Like