When the app starts, sometimes the last process has not remove its server.pid file. This causes startup to fail. This is an issue in production because it requires manual intervention if the app or server restarts for any reason.
Reproduce:
- Start rails app with docker-compose.
- Force-close app with ctl-c
- Restart app with docker-compose
- See error message in console/logs:
app_1 | A server is already running. Check /app/tmp/pids/server.pid. app_1 | Exiting ghgvc-1_app_1 exited with code 1
When the app starts, sometimes the last process has not remove its server.pid file. This causes startup to fail. This is an issue in production because it requires manual intervention if the app or server restarts for any reason.
Reproduce:
app_1 | A server is already running. Check /app/tmp/pids/server.pid. app_1 | Exiting ghgvc-1_app_1 exited with code 1