Hi all,

I've recently inherited a django site that's been behaving very
strangely of late. When the app starts up it runs fine for a while,
but after some time (anywhere between 1 hour and 24 hours, possibly
depending on server load) it starts to consistently return 500 errors.

Given that it runs fine to begin with, I'm tending to rule out the
standard apache permissions issues that everyone runs into at one
point or another. As far as I can tell, apache has all the permissions
it needs to read files, write pyc files in place, etc.

When the site starts to fail, the error in the apache log refers to a
particular line in one of our app's models.py files:


[Tue Aug 10 22:20:16 2010] [error] [client 127.0.0.1]     from
glue.models import BaseContent, ContactMixin, LocationMixin
[Tue Aug 10 22:20:16 2010] [error] [client 127.0.0.1] ImportError:
cannot import name BaseContent


(where those are all models that are properly defined elsewhere in the
django app)

This would normally provide a clue as to where the problem is (a path
issue, perhaps?), except that the error disappears if you force the
system to regenerate the .pyc for the failing model.py. It will then
work happily for a while, until the same issue comes up again some
hours later. It seems like something is periodically causing this
particular pyc to be unusable by mod_wsgi.

This still feels like a permissions issue, as the built-in django
runserver can load the model without problems, even when mod_wsgi is
failing.

Has anyone seen anything like this before?

bo.




-- 
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