Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#15655 closed (invalid)

(pylibmc) cache.set() hangs

Reported by: fahhem Owned by: nobody
Component: Core (Cache system) Version: 1.3-rc
Severity: Keywords: pylibmc
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


My setup is a localhost memcached server on the default port:

    'default': {

When the backend changes to MemcachedCache, the problem goes away so this is definitely pylibmc. I did this exact setup on two different projects and two separate machines over the span of the last two weeks and I ran into this same problem both times:

When using cache.set(key,value,timeout), some keys will hang the thread/process when served through Apache (v2.2.16-1ubuntu3.1). When using ./ runserver or runserver_plus, cache.set() works and when I switch from runserver to apache it works fine because cache.get() gets the value and no cache.set() is called. When the timeout passes, apache again hangs at the same cache.set(). I used a ton of logging.error() calls to find where apache hangs.

This machine is Ubuntu but the first machine with the problem was a Debian machine, both are running mostly stable, with a few non-critical packages from testing. Both run python2.6 and django 1.3, the first machine was 1.3-beta-1, this one had the problem in both beta and rc.

Change History (3)

comment:1 Changed 8 years ago by Ludvig Ericson

Resolution: invalid
Status: newclosed
  • Which version of pylibmc?
  • Which version of libmemcached?
  • What are you trying to set, a string, a complex type, ...?
  • Do all sets cause this behavior, i.e. is it reproducible?
  • What is your Apache configuration, how are you even running Django - mod_wsgi? If so, under what parameters?

Answer these questions, and do so on - this has nothing to do with Django, as you so aptly pointed out.

comment:2 Changed 8 years ago by Ludvig Ericson

And in hindsight, my reply might seem a bit arrogant - sorry for that, you obviously took some time to make this ticket. However, for me to help you I need you to follow the above instructions.

comment:3 Changed 8 years ago by fahhem

I should probably have done so, but I didn't know what cache.set() translates to for pylibmc so I'll look that up and redo this ticket in the right place.

Note: See TracTickets for help on using tickets.
Back to Top