[mod_python] How to handle memcached connections?

Jon-Pierre Gentil jgentil at sebistar.net
Wed Feb 8 00:22:46 EST 2006


On Tuesday 07 February 2006 14:20, Sebastjan Trepca wrote:

> I'm using memcache to store sessions in it. For now I create a new
> connection for each request which is quite inefficient. I'm using
> apache2-worker and I tried to store a connection as a global variable
> of a module. It worked as long as there were only one conccurent user
> on the site. When there were more the sessions started to mix, so one
> user got a session of the other etc. Of course I forgot about the
> thread thingy :)

Is it really that inefficient?  Have you done any stress testing or 
profiling to determine that?  A lot of web applications make a new 
connection to RDBMS databases on each page load, so I can't imagine that 
connecting to a memcache each time is terribly slow or strenuous.

-- 
_________________________________________________________

  Jon-Pierre Gentil     KC9CAF    PGP: 0x7E1CBA17
  jabber: jgentil at sebistar.net    web: www.sebistar.net
  "If you think education is expensive, try ignorance."
_________________________________________________________ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060207/1faa8481/attachment.bin


More information about the Mod_python mailing list