Search code examples
serverlocalhostdevopswagtaillinode

How to kill Wagtail server?


I've completed the installation process for Wagtail on Linode but haven't deployed yet. I started the server with ./manage.py runserver but accidentally exited without stopping the server. The ./manage.py help command doesn't show how to stop the server. What's the best way to stop it so that I can restart it on 0.0.0.0:8000? Should I just reboot the Linode server? Thanks!


Solution

  • Killing the process will stop the wagtail server.

    First search for your process id (PID), filtering by "manage.py runserver"

    ps aux | grep "manage.py runserver"
    

    You will see something like this:

    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    [...]
    user        38  0.0  0.0      0     0 ?        S     2433   0:00 python manage.py runserver 0:8000
    

    Then you can kill your process using kill -9 $PID, in this example $PID is 38:

    # Terminate running process    
    kill -9 38
    

    Now you should be able to start your app normaly with using:

    ./manage.py runserver

    Restarting your Linode server will also solve this, but its like killing a fly with a hammer :)