Hallöchen!

Torsten Bronger writes:
> Sometimes, we experience a massive increase in active connections
> to the memcached server when calling cache.clear().  This causes
> server tracebacks because the server cannot open files
> (e.g. Python modules) anymore: "error 24: Too many open files".

I found an easy way to reproduce this (with memcached activated in
settings.py):

chantal@mandy:~/chantal$ ./manage.py shell
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.core.cache import cache
>>> for i in xrange(2000): cache.set(str(i), str(i))
...
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File 
"/usr/lib/python2.6/dist-packages/django/core/cache/backends/memcached.py", 
line 64, in set
  File "/usr/lib/pymodules/python2.6/memcache.py", line 502, in set
  File "/usr/lib/pymodules/python2.6/memcache.py", line 675, in _set
  File "/usr/lib/pymodules/python2.6/memcache.py", line 278, in _get_server
  File "/usr/lib/pymodules/python2.6/memcache.py", line 883, in connect
  File "/usr/lib/pymodules/python2.6/memcache.py", line 897, in _get_socket
  File "/usr/lib/python2.6/socket.py", line 182, in __init__
error: [Errno 24] Too many open files

It *seems* (I don't know for sure) that a socket it opened by
cache.set() but not closed.  Is this the expected behaviour?

Tschö,
Torsten.

-- 
Torsten Bronger    Jabber ID: torsten.bron...@jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to