2009/3/19 Pete <[email protected]>:
>
> On Mar 18, 3:35 pm, Graham Dumpleton <[email protected]>
> wrote:
>
>> This is not an error from mod_wsgi but from Django and has been
>> encountered by various people and not just with mod_wsgi.
>
> Thanks Graham. I dug through a number of Django references before
> posting here. I'm on Django 1.0.X so Django ticket #8221 has been
> fixed and you'll notice that no arguments are being sent to the
> reverse (as expected) so it is not a regex urlresolver issue. I can
> view the same page w/ the same content hundreds of times without
> having an issue, but every day or 2 I get the error.
>
> The reason I bring it up here is that the only common thread I can
> find is the mod_wsgi activity in my Apache error log (pasted in the
> original email) about it loading the wsgi script at the same time the
> error occurs. Does mod_wsgi reload the script when 500s are
> encountered?

No.

But, by your configuration you have:

  maximum-requests=500 inactivity-timeout=600

This means the daemon processes are restarted every 500 requests. This
is a quite low value and wouldn't recommend it. One would only even
use this option if your application has a problem with memory leaks,
either explicit or through a poorly written caching system. So, why
are you using maximum requests option?

The inactivity timeout would only kick in after 10 minutes of no
requests at all and if your application is used a lot, in practice
shouldn't ever occur. What was your reasoning for setting the
inactivity timeout?

> If not, is it possible for unexpected behavior to occur
> if we try to access the app during the wsgi script load process?

No, not at least due to an access occurring while the reloading is
happening, as requests will just be queued.

Your problem could be though that you are missing a required import
dependency. That is, something which maps strings to module/functions
is being triggered without the module it requires to work not having
been imported. It may work later in the life of the process because
something has as a side effect later imported it. Thus you have an
ordering issue and whether things works depends order URLs are
requested. I give imports here as a possibility, may it may be some
other form of initialisation.

Graham

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to