Hello everyone
I have a task that connects thousands of servers through the Ansyncssh library and executes commands. Normally, it can be completed within one minute, and through the APScheduler scheduled task library, it is executed every minute. However, after a period of normal execution, there will be a random error message for the scheduled task, skip: maximum number of running instances reached (1), At this point, there will be a maximum of more than 70 identical Python management. py runserver processes on the Linux server. Killing them will immediately start. What are these processes and why do scheduled tasks not end (I have scheduled tasks for batch ping servers that do not occur)? How can I use django to troubleshoot what these processes are doing or where they are stuck?
dxgmapp 3281146 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
dxgmapp 3281147 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
dxgmapp 3281148 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
dxgmapp 3281149 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
dxgmapp 3281150 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
dxgmapp 3281151 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
dxgmapp 3281152 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
dxgmapp 3281153 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
dxgmapp 3281154 3262243 0 22:00 ? 00:00:01 /appdata/mainProject/server/venv/bin/python manage.py runserver xxx.xxx.xxx.xxx:8000
…