-
Hi there, Do you know how to ensure that the server is always running. Let's say the (physical) server restarts, will the (WebSocket) server restart automatically? If not, there must be a service that checks if an instance of the server is launched, and if it is not the case, launch one? I had the idea to run the command to start the server with a service, but I noticed if two commands are executed, two servers starts with two different PID. It might be a problem knowing that they are listening on the same port. It's possible that the users on the old server instance are disconnected, I don't know. Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This would be a job for something like supervisord. Below is a basic config I use for one of my apps: [supervisord]
nodaemon=true
[program:app_websocket]
command=php /var/www/html/bin/console gos:websocket:server
numprocs=1
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 |
Beta Was this translation helpful? Give feedback.
This would be a job for something like supervisord. Below is a basic config I use for one of my apps: