Earlopain / FoxTrove

E6 Upload Helper
GNU General Public License v3.0
6 stars 3 forks source link

puma: A server is already running (pid: 7, file: /tmp/server.pid). #106

Closed faucetlol closed 11 months ago

faucetlol commented 11 months ago

Not exactly a problem with Reverser, but one that has me truly stumped. Reverser crashed and I've been unable to open it since.

reverser-reverser-1    | 08:36:16 puma.1     | started with pid 7
...
reverser-reverser-1    | 08:36:18 puma.1     | => Booting Puma
reverser-reverser-1    | 08:36:18 puma.1     | => Rails 7.1.1 application starting in development 
reverser-reverser-1    | 08:36:18 puma.1     | => Run `bin/rails server --help` for more startup options
...
reverser-reverser-1    | 08:36:18 puma.1     | A server is already running (pid: 7, file: /tmp/server.pid).
reverser-reverser-1    | 08:36:18 puma.1     | Exiting
reverser-reverser-1    | 08:36:18 good_job.1 | GoodJob started cron with 1 job.
reverser-reverser-1    | 08:36:18 puma.1     | exited with code 1
reverser-reverser-1    | 08:36:18 system     | sending SIGTERM to all processes
reverser-reverser-1    | 08:36:18 frontend.1 | terminated by SIGTERM

I've looked in /tmp and there's no server.pid file there. I couldn't find it in /app/tmp or the actual project files either. In desperation I've searched the entire container's filesystem (as well as my PC's, just in case) for server.pid with no results.

Earlopain commented 11 months ago

Every time you run docker compose up or docker compose run ... it creates a new environment for the app. Since the pidfile is not part of the filesystem that is preserved (through something like a named volume) looking in the folders will never show any results.

I assume you have already shut down the containers with something like docker compose down? That should result in subsequent ups getting a new filesystem. My current thinking is that only one process crashed but the others are still running and thus keeping the current environment with the pidfile alive.

faucetlol commented 11 months ago

I assume you have already shut down the containers with something like docker compose down?

I was sure I'd tried this before, but apparently that was indeed the fix I was looking for. A little annoying, but hey, at least it works now.