"Runserver" quits after "Performing system checks"

Hi Everybody!

I´m currently not able to run my Django Project on a external server (connected via SSH). Every time i try “python manage.py runserver” the process stops after “Performing system checks…” and ends without any error. The same project runs perfectly on my local machine. Any ideas what that could be?

Thanks for your help.

Check for any log files that may be written - including syslog. Check file permissions. If you’re trying to launch it to listen on ports 80 and/or 443, ensure that the account you’re using has the permissions to do so. (Port numbers 1024 and below are “protected” / “reserved” ports.) Try running with “-v 3” for more verbose output.
Recognize that running it that way will only keep it up and running while you’re logged on. Hopefully this is just for a test and that you’re not really going to try to leave a Django runserver running, exposed to the internet…

1 Like

Wow thanks for your fast answer!

Ok, just to clear that up: This is a studyproject and i try to test my website on the universitys server.
As you can image i do not have admin rights, so the admins reserved a port for me: 8051.

With this information I registered the hostname at “ALLOWED_HOSTS = [servers_domain]” and tried to run the server like this:

  • python -v manage.py runserver
  • python -v manage.py runserver 8051
  • python -v manage.py runserver

All with the same result:
(my_venv) $ python manage.py runserver
Watching for file changes with StatReloader
Performing system checks…
→ Nothing

The verbose output looks like this:

import ‘django.contrib.staticfiles.management.commands.runserver’ <_frozen_importlib_external.SourceFileLoader object at 0x7f6764ee8100>
Watching for file changes with StatReloader
Performing system checks…
import ‘gc’ # <class 'frozen_importlib.BuiltinImporter’>
#clear builtins.

So in here i can´t see any permission issues.
I also tried to catch errors with a Django Logging Handler, but the results in debug.log look like this:
Watching for file changes with StatReloader
Waiting for apps ready_event.

Now i write the admin to get insight to the syslog files…

But to clarify all eventualities:
Could it have something to do with a missing Database?
Is there a way to check if all Django Components are installed properly?

When you say “Nothing” - does that mean it has exited back to the shell prompt, or that it appears to be hung at that point?
If the latter, how long have you waited before killing the process?

What do you get for the output of a manage.py check? How about manage.py shell? (Or if you have django_extensions loaded, shell_plus)

You show a section of output from the run with -v 3. Is that the complete output, or was there more beyond that? If there’s more, it’s what’s at the end that would be most useful. (Probably within the last 50-100 lines.)

Every time I’ve made that mistake, there’s an error generated.

A pip check should show any packages that might be missing.

What specific versions of Django and Python are being used? (pip list will show the Django version, and python -V will do the same for python.)

And to cover the fundamentals here, have you confirmed that your application is on that server in the directories you’re expecting it to be in?

Nothing means that it exited back to the shell prompt.

python manage.py check: returns “Illegal instruction”.
python manage.py shell: opens the shell as expected.

There is more in the -v promt. This is the tail:
cleanup[3] wiping _frozen_importlib
cleanup[3] wiping sys
cleanup[3] wiping builtins
destroy _frozen_importlib
clear sys.audit hooks

pip check ist fine: No broken requirements found.

Django: 3.2.5 (I already did an upgrade from 3.1.7 which i used for development)
Python: 3.8.11
Pip: 21.1.1

And yes. All the files are in their right position.

The error being thrown by check is a big red flag. There’s got to be something within the verbose output identifying the issue.

I faced the exact same issue a couple of days ago, and I found out that closing apps that have high memory usage(like chrome in my case) fixed the issue. Hope that helps.