43π
Python C extension modules, like numpy, are known to cause timeouts when used under mod_wsgi. Thereβs a clear explanation of the problem (direct from the author of mod_wsgi) available at https://serverfault.com/a/514251/109598
If that sounds like it might be the cause of your problem, then the solution is probably simple β add the following to your httpd.conf:
WSGIApplicationGroup %{GLOBAL}
Be sure to restart your Apache instance after making that change.
7π
Try increasing Timeout
directive in httpd.conf
, which defaults to 60 seconds in Apache 2.4. For example:
TimeOut 600
- [Django]-Django REST framework: type object X has no attribute 'get_extra_actions'
- [Django]-Using IntellijIdea within an existing virtualenv
- [Django]-Django Heroku Error "Your models have changes that are not yet reflected in a migration"
7π
Here is how I was able to find the root cause of my issue.
python manage.py showmigrations
My app could not reach the database server, so it would eventually time out. Running manage.py I could see see the error message on the console.
- [Django]-Add Indexes (db_index=True)
- [Django]-Serializing Foreign Key objects in Django
- [Django]-How to do a multi-step form in Django?
0π
In my case (Python 3.6), the mimetypes module caused this problem. I did not further investigate this, but removing a call to mimetypes.guess_type
solved the problem. The call was made in the related Django view function.
- [Django]-Django {% with %} tags within {% if %} {% else %} tags?
- [Django]-Test Django views that require login using RequestFactory
- [Django]-What's the best solution for OpenID with Django?
0π
I hit the same problem because the home directory of the user under which the wsgi process was running had became unavailable at some point during the server upgrade.
This might help someone.
- [Django]-CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False
- [Django]-How to get request object in django unit testing?
- [Django]-How to suppress the deprecation warnings in Django?
0π
Thank you to lenhhoxung who in the comments to one of the other solutions mentioned upgrading server capabilities. I had been successfully running a demo site on an AWS EC2 Nano instance for a long time, but for some reason it suddenly started erroring out on one page that has some complex computations. I upgraded it to an AWS EC2 Micro instance, problem solved. I think this is worthy of its own answer here considering this took a good chunk of a day. All credit to lenhhoxung, though! Thanks!
- [Django]-Django: how can I tell if the post_save signal triggers on a new object?
- [Django]-Check for presence in a list django template
- [Django]-Django REST Framework: Setting up prefetching for nested serializers