Re: Problem with memcached after many hits

2007-10-30 Thread web-junkie

After further investigation I saw that memcached connections kept
adding up, until they reached the limit. From that point it got slow
and DB load jumped up. An Apache reload made everything fast again.
After googling for memcached connections or so, I found
http://groups.google.com/group/django-developers/browse_thread/thread/f83eb95f35c9d9a
which should be the same issue. The fix was to upgrade mod_python (had
to switch from a stable to testing on my Debian).
So, yeah, should be fixed now. Weird issue.

On Oct 30, 9:51 am, web-junkie <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a weird problem where I think memcached or caching in general
> might be the cause. I discovered it during testing the site with
> http_load. After a certain amount of fetches, or hits, to the server,
> the site does not respond normally. It takes 30 seconds or so. Strange
> thing is: Only for cached pages. Non cached pages still load fast
> afterwards.
> When I do the test on a not cached page it is normal, too. No
> problems. But on cached page it seems the site is somehow off track.
> Only fix is to do apache reload.
> The problem is not only with http_test, but after some hours of
> traffic, too! Seems like the cache thinks "That's enough for today",
> until you reload apache.
> Strange problem, maybe I did something wrong somewhere. Any ideas?
> Help would be appreciated. Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Problem with memcached after many hits

2007-10-30 Thread web-junkie

Oh, and I'm running exactly one Django site on the server.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Problem with memcached after many hits

2007-10-30 Thread web-junkie

On Oct 30, 11:30 am, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> Are you using Apache prefork MPM or worker MPM? If worker, how many
> threads in each process? Also, what do you have for maximum number of
> child processes in Apache configuration. Finally, how many Django
> instances are you hosting?

I'm using prefork, as recommended. Settings as follows:

StartServers20
MinSpareServers 20
MaxSpareServers 40
ServerLimit 300
MaxClients  300
MaxRequestsPerChild 4000


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Problem with memcached after many hits

2007-10-30 Thread Jarek Zgoda

Graham Dumpleton napisaƂ(a):

> BTW, does everyone use the pure Python memcached client module, ie.,
> memcache. Have seen comments to the effect that C client is three
> times faster, although if you then want object marshaling on top of
> that it would slow down a bit.

cmemcache still seems to segfault unacceptably (ie. when memcached goes
down).

-- 
Jarek Zgoda
Skype: jzgoda | GTalk: [EMAIL PROTECTED] | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Problem with memcached after many hits

2007-10-30 Thread Graham Dumpleton



On Oct 30, 7:51 pm, web-junkie <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a weird problem where I think memcached or caching in general
> might be the cause. I discovered it during testing the site with
> http_load. After a certain amount of fetches, or hits, to the server,
> the site does not respond normally. It takes 30 seconds or so. Strange
> thing is: Only for cached pages. Non cached pages still load fast
> afterwards.
> When I do the test on a not cached page it is normal, too. No
> problems. But on cached page it seems the site is somehow off track.
> Only fix is to do apache reload.
> The problem is not only with http_test, but after some hours of
> traffic, too! Seems like the cache thinks "That's enough for today",
> until you reload apache.
> Strange problem, maybe I did something wrong somewhere. Any ideas?
> Help would be appreciated. Thanks.

Are you using Apache prefork MPM or worker MPM? If worker, how many
threads in each process? Also, what do you have for maximum number of
child processes in Apache configuration. Finally, how many Django
instances are you hosting?

There were a few comments recently about issues with using memcached
in worker MPM due to each thread creating a connection to memcached
servers. If this turns out to be the case, could be possible to
exhaust maximum number of connections that memcached servers will
accept. Still need to look into this to work out what is reality, but
your feedback on your setup might help in that.

BTW, does everyone use the pure Python memcached client module, ie.,
memcache. Have seen comments to the effect that C client is three
times faster, although if you then want object marshaling on top of
that it would slow down a bit.

Graham


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Problem with memcached after many hits

2007-10-30 Thread web-junkie

Hi,
I have a weird problem where I think memcached or caching in general
might be the cause. I discovered it during testing the site with
http_load. After a certain amount of fetches, or hits, to the server,
the site does not respond normally. It takes 30 seconds or so. Strange
thing is: Only for cached pages. Non cached pages still load fast
afterwards.
When I do the test on a not cached page it is normal, too. No
problems. But on cached page it seems the site is somehow off track.
Only fix is to do apache reload.
The problem is not only with http_test, but after some hours of
traffic, too! Seems like the cache thinks "That's enough for today",
until you reload apache.
Strange problem, maybe I did something wrong somewhere. Any ideas?
Help would be appreciated. Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---