Large number of rejected connections in memcached using django

41 Views Asked by At

I'm using Django-4.6.2 with memcached-1.5.22 in Ubuntu-focal (20.04 LTS).

The Django Cache settings (django.conf.settings.CACHES) are as follows:

 {
   'default': {
       'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
       'LOCATION': '127.0.0.1:11211'
   }
 }

memcached is configured to use 1GB of memory (-m 1024), uses port 12111 (-p 11211), listens to localhost (-l 127.0.0.1) and has a maximum object size of 32MB (-I 32M).

Despite this, there seem to be a large number of rejected connections in memcached stats (obtained via telnet):

STAT max_connections 1024
STAT curr_connections 1
STAT total_connections 2462353
STAT rejected_connections 2462352
STAT connection_structures 11

Django is configured with wsgi, with processes=12, threads=12.

Is this large number of rejected connections normal? What is the likely cause?

0

There are 0 best solutions below