I had served my website on Apache server and it is Django based project. I was able to run my website from one month. Now when i have pulled my repository from github and now it is showing 500 error. When i am activating my virtual environment and i am running python manage.py runserver my_ip_address then it is showing everything proper in terminal but when i am trying to excess in my web browser then it is showing nothing. Then i have tried python manage.py runserver my_ip_address:8080 then it is working properly. When i have checked my apache server error.log|tail then it is showing some error which i am attaching error low below. I am using postgres and when i was pulling my repository for the last time then after python manage.py makemigrations it asked me to give one default time for one of my field and i have provided timezone.now. In last git pull i have changed many things but if there could have error then my python manage.py runserver my_ip_address:8080 in virtual host should not work but it is working properly. I have also restarted the apache server service apache2 restart and i have also used with sudo.
[Sun Aug 05 19:06:20.530154 2018] [wsgi:error] [pid 31141:tid 140598172460800] [remote 136.232.1.166:12161] File "/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Sun Aug 05 19:06:20.530173 2018] [wsgi:error] [pid 31141:tid 140598172460800] [remote 136.232.1.166:12161] django.setup(set_prefix=False)
[Sun Aug 05 19:06:20.530182 2018] [wsgi:error] [pid 31141:tid 140598172460800] [remote 136.232.1.166:12161] File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
[Sun Aug 05 19:06:20.530196 2018] [wsgi:error] [pid 31141:tid 140598172460800] [remote 136.232.1.166:12161] apps.populate(settings.INSTALLED_APPS)
[Sun Aug 05 19:06:20.530204 2018] [wsgi:error] [pid 31141:tid 140598172460800] [remote 136.232.1.166:12161] File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 78, in populate
[Sun Aug 05 19:06:20.530218 2018] [wsgi:error] [pid 31141:tid 140598172460800] [remote 136.232.1.166:12161] raise RuntimeError("populate() isn't reentrant")
[Sun Aug 05 19:06:20.530236 2018] [wsgi:error] [pid 31141:tid 140598172460800] [remote 136.232.1.166:12161] RuntimeError: populate() isn't reentrant
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
I could suggest following the steps here on how to serve Django applications with Apache:
Also for some more information about the problem, I would suggest following the steps here on how to troubleshoot common Apache problems:
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.