Sadly there is not much to trace back, the dev server runs fine with
memcache, but mod_python/apache doesn't. Mod_python/apache work with the
file system cache as does the dev server, with memcache as the cache
storage mod_python/apache will just use up almost all cpu and ram, and
the load never goes down (unlike a restart without cache or with file
system cache). The site isn't busy, and sockstat shows httpd processes
connecting to memcache then disconnecting frequently. I've checked thru
the code and it looks good, cmemcache shouldn't be giving me any
problems. Middlewear order also looks fine.
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.middleware.cache.CacheMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
Eratothene wrote:
> I think you better not disable cache middleware in tests. If tests
> fail, so will be in production. I had similar problem, I thought it
> was something wrong with tests, but really it was problem in the code.
> My site was running well on django built-in server, but not on apache
> mod_python.
>
> The problem was in incorrect order of middlewares. Cache middleware
> must be after session middleware. Personally I think it is bug django
> that causes such behavior. Please post your traceback of the failed
> tests.
>
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.cache.CacheMiddleware',
>
>
> Norman Harman wrote:
>
>> Hi,
>>
>> request.template is None instead of what it should be because the response
>> is from the
>> cache middleware.
>>
>> Which is fine. My question is there a good way to disable the cache
>> middleware during
>> tests?
>>
>> "good" being atleast the following. is automatic, isn't based of value of
>> DEBUG, doesn't
>> require changing django distro.
>>
>> Is there a special settings file or other file imported during tests only?
>>
>> thanks,
>> njharman
>>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---