[Raspberry Pi 3B+ - Keeps restarting upload] NGINX + Supervisor + Gunicorn + Aiohttp


I have the following problem. When starting the asynchronous HTTP server for asyncio and Python Aiohttp with Gunicorn and Supervisor in conjunction with Nginx, I get an eternal reboot and Docker kills the service.

Please help solve the problem.


This behavior usually means that the supervisord process ended. Can you provide any logs when this happens or could you grant us support access to a device that shows this behaviour?
In general I would recommend splitting up the services into different containers and only run one service per container. Maybe this is also a solution that would work for your use case.



The rest of the logs are empty

UUID: 729f265a0ee31a2cef759cab95da660a

This seems like a possible Gunicorn bug – https://github.com/benoitc/gunicorn/issues/1801 – your app is restarting because the python process is dying.

No errors were found in Python code. After reducing the number of workers at Gunicorn to one, the problem was resolved.

It was: workers = multiprocessing.cpu_count() * 2 + 1
Fixed: workers = 1