Problems while deploying code changes to the socket server
I have a problem deploying my application while socket process is running.

So the idea in this project is that socket process is always running using supervisor. Now this process can get a message from the website that it needs to start Symfony command via Symfony Process tool: https://symfony.com/doc/current/components/process.html

When I deploy some changes to the production server, I always restart the socket supervisor process (because code has changed after the release). Now if there is at least one running command (initiated by socket) it always freezes and I need to kill the socket process by hand and restart supervisor again. And if there is no commands running at the time of deployment - supervisor restarts fine and no errors occur.

Any idea what could be wrong? Command process start function is inside try catch block so it shouldn't return any errors.