When I am starting rails server using rails s
command it is showing A server is already running. Check C:/Sites/folder/Pids/Server.pids
Whe
I just had this issue and tried setting it to a different port, but the only thing I needed to do was to delete my [app_directory]/tmp/pids/server.pid
and everything was good to go.
On Windows Rails 5.2, delete this file
c:/Sites/<your_folder>/tmp/pids/server.pid
and run
rails s
again.
Run: fuser -k -n tcp 3000
This will kill the process running at the default port 3000.
Probably you suspended the server by: ^Z
.
The four digital number that vim C:/Sites/folder/Pids/Server.pids
outputs is the process id.
You should kill -9 processid
, replacing the process id with the 4 numbers that vim (or other editor) outputed.
lsof -wni tcp:3000
Then you should see the ruby process and you can run
kill -9 processid
you should be good to run the process now
rails s thin
running multiple processes doesn't seem like a good idea and from what i've read many people agree. I've noticed many memory leaks with rails unfortunately so I couldn't imagine having two processes running. I know with one overtime my page refreshes increasingly become slower because of the data being stored on memory.
kill -9 $(lsof -i tcp:3000 -t)