# Session/logged in user issue

**URL:** <https://www.ruby-forum.com/t/session-logged-in-user-issue/117240>\
**Category:** Rails\
**Created:** [October 15, 2007, 6:54am UTC](https://www.ruby-forum.com/t/session-logged-in-user-issue/117240 "2007-10-15T06:54:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahnovetsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@mahnovetsky](https://www.ruby-forum.com/u/mahnovetsky)\
**Post date:** [October 15, 2007, 6:54am UTC](https://www.ruby-forum.com/t/session-logged-in-user-issue/117240/1 "2007-10-15T06:54:02Z")

</div>

Hi guys

We have a really bad issue with our rails app. Sometimes a logged in  
user who has been browsing around for a bit will be logged in as  
someone else. This only happens sometimes which is making this a  
really difficult issue to track down.

The current set up is with apache which also acts as a load balancer  
and 4 mongrels. We use memcached to store the session.

It seems like the session id or cookie is being cached and then handed  
to mongrel. Mongrel then hands back info for some other user. Or maybe  
it is some memcached issue with mongrel not handling concurrently  
correctly. Really baffled as to why this is happening.

Any help will be appreciated. TIA

---

<div class="post-metadata">

**Author:** ![mahnovetsky](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@mahnovetsky](https://www.ruby-forum.com/u/mahnovetsky)\
**Post date:** [October 16, 2007, 3:15am UTC](https://www.ruby-forum.com/t/session-logged-in-user-issue/117240/2 "2007-10-16T03:15:20Z")

</div>

Issue solved. It was apache caching cookie information - who would  
have thought. I found my answer from this article

[http://issues.apache.org/bugzilla/show\_bug.cgi?id=42935](http://issues.apache.org/bugzilla/show_bug.cgi?id=42935)

More info about caching cookie can be found here  
[http://httpd.apache.org/docs/2.2/en/mod/mod\_cache.html#cacheignoreheaders](http://httpd.apache.org/docs/2.2/en/mod/mod_cache.html#cacheignoreheaders)
