On 3/01/2015 10:19 PM, Paul Antropius wrote:
> Good morning,
>
> The production server sends absolutely **no response** when DEBUG is set
> to FALSE.
> Browser still waits for a response : no error (neither 404, nor 500) is
> raised. Minutes later, it ends up with a 503 error.
>
> Apache error log reads :
> HTTPError: HTTP Error 404: Not Found trying request again in 5 seconds
> HTTPError: HTTP Error 404: Not Found trying request again in 10 seconds
> HTTPError: HTTP Error 404: Not Found trying request again in 15 seconds
> ...
> I can find not instance of this king of behaviour looking in Google :
> why would apache repeatingly try to connect after a HTTPError ? Is the
> server supposed to set himself up after realizing it has been wrong ??
>
> I have looked after the common issues :
>
> 1) ALLOWED_HOST is set correctly. ['*'] leads to the same result.
>
> 2) It looks like there is no "ImportError" (I have grossly checked that
> the code is loaded, and I guess it would otherwise raise an ImportError).
If the system works under the dev server it looks like all the software
works. But the dev server is quite forgiving if software loads in the
"wrong" sequence. Apache might be revealing import loops.
You could try moving imports out of the module and down into the method
namespaces experimentally to see if that helps.
>
> 3) I do have static files issues : some are not loading as expected,
> using {% load staticfiles %} and {% static ''%}.
> I have suspected that my custom 404.html page would loop with a static
> file HTTPError, but it is apparently not the case.
Try vanilla 404 for the moment.
>
> What I can affirm :
> The error occurs after :
> * settings.py is loaded.
> * models are loaded ;
>
> The error occurs before :
> * urls.conf is loaded ;
> * views.py is loaded.
>
> Eventually, I do not understand :
> * what raises a HTTPError when DEBUG is set to False ;
> * why this HTTPError is not caught by Django ;
> * Why apache does not simply sends back a 404 signal ?
Apache seems to be retrying the 404 every 5*n seconds where n is
incrementing by 1 for each retry. I think I would be trying to change
that behaviour first and maybe eliminate retries until the "main"
problem surfaces.
>
> I'm stuck on a saturday trying to figure out where and what would be
> this error.
Sunday morning here :)
>
> Any help would be very appreciated.
>
> Thank you very much.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
django-users...@googlegroups.com
> <mailto:
django-users...@googlegroups.com>.
> To post to this group, send email to
django...@googlegroups.com
> <mailto:
django...@googlegroups.com>.
> Visit this group at
http://groups.google.com/group/django-users.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-users/9f348c04-79e7-43e7-be51-31180d7658e0%40googlegroups.com
> <
https://groups.google.com/d/msgid/django-users/9f348c04-79e7-43e7-be51-31180d7658e0%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.