0

I am a 1st year CS Graduate Student who has been put in charge of a refactoring project. The refactoring project has a Django backend that implements a postgresql database using python 3.8. I've never used Django previous to this project so I apologize if the answer is simple. I have the backend refactored and I can run our Django backend locally. However, when I try to run our backend with sudo python3.8 manage.py runserver on our new RHEL 8 server it seems to get hung up after the system check: runserver example

I also know that I need to create a super user for the Django postgresql database, but when I run

sudo python3.8 manage.py createsuperuser --username <username>

Where <username> is an actual name, it also seems to get hung up without outputting anything. Neither of these are outputting an error so I'm unsure what's happening.

I know that it's not common practice to use sudo with these commands, but the server gives me permission denied errors if I don't use sudo. I'm not the one who set up the server, our IT department did it and I'm unsure if I needed them to do something specific or not.

Another thing is that I use a virtual environment when I run our backend locally, but on our server I'm not using a virtual environment. My thought process here is that the server is meant to be the environment for our backend so I assumed we didn't need a virtual environment. So, with this in mind, I tried runserver and createsuperuser just like I did before but inside a virtual environment (with all the dependencies installed), and I get the same results. No errors, the server just seems to hangup.

I don't believe it's a memory issue (though I could be wrong), because the folder our backend is in has 20GB allocated to it and our backend app only takes up ~9GB.

I know this is a lot, I'm sure I forgot to mention something important. Please let me know if there's other information needed.

Any help is appreciated, thank you.

1 Answers1

0

Compare the psycopg / python / whatever connectors / libraries you're using in the virtual environment vs the server environment. Red hat is not bleeding edge and there could be an incompatibility problem between the python version and other libraries. Look into using docker to maintain local / production environment parity.

PersonPr7
  • 136
  • 7