You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user runs hugo server and specifies a port, e.g. hugo server --port=55555 currently what it does is assign new port:
ERROR: 2016/02/25 port 55555 already in use, attempting to use an available port
I would argue that if the port is currently in use, hugo should abort instead of assigning a new port, because the user specified the port for a reason. For example it is the port that's exposed in a container or in a shared hosting environment.
In production it is also useful to start a server periodically via crontab in order to automatically restart a server in case of it crashing, and the current behaviour of hugo server results in processes being spawned with every call. It would be nicer if hugo aborts thus allowing the cronjob to restart the server if it dies for any reason.
My current workaround is a script that store a pid file and manages it with start/stop/restart comments as described in this thread.
The text was updated successfully, but these errors were encountered:
If a user runs hugo server and specifies a port, e.g.
hugo server --port=55555
currently what it does is assign new port:I would argue that if the port is currently in use, hugo should abort instead of assigning a new port, because the user specified the port for a reason. For example it is the port that's exposed in a container or in a shared hosting environment.
In production it is also useful to start a server periodically via crontab in order to automatically restart a server in case of it crashing, and the current behaviour of hugo server results in processes being spawned with every call. It would be nicer if hugo aborts thus allowing the cronjob to restart the server if it dies for any reason.
My current workaround is a script that store a pid file and manages it with start/stop/restart comments as described in this thread.
The text was updated successfully, but these errors were encountered: