If you’re encountering that port already in use error with your python/django projects you can kill the process running on the specific port and restart the server.
If you’re trying to run the server on port 3333 and you’re encountering the error, run the following command and that kills the process running on port 3333.
sudo fuser -k 8000/tcp
To Kill the process on Mac, you can run the following command.
sudo lsof -t -i tcp:8000 | xargs kill -9
If you’re running your applications with the help of Process Manager (PM2) and getting this error on production environment. You may want to re-check your PM2 Ecosystem file and update the value for “script”: “manage.py” with “script”: “python manage.py”. Which should get rid of the error you were encountering.
Be First to Comment