Users take sessions of other users when sessions are stored in memcached (Rails)

后端 未结 5 2169
眼角桃花
眼角桃花 2020-12-14 10:30

I have a very weird problem, when storing my session in Memcached. From time to time some users takes the session of others. E.g. John, becomes logged in as Maria, Maria as

5条回答
  •  伪装坚强ぢ
    2020-12-14 11:16

    I've seen this and found it very difficult to debug.

    If you're using passenger, you may want to look at using the conservative method for spawning new servers.

    The default method has servers sharing a single socket to memcache.

    The docs discuss it in more detail. http://www.modrails.com/documentation/Users%20guide%20Apache.html#_example_1_memcached_connection_sharing_harmful

提交回复
热议问题