Answers.Body: <p>As of Craft 2.3, <a href="http://buildwithcraft.com/docs/config-settings#overridePhpSessionLocation" rel="nofollow">overridePhpSessionLocation</a> is set to false by default.  Meaning that wherever Apache (or whatever web server you're using) and PHP is configured to save the PHP session files, that's where they will go.</p>
  
  <p>If you set <code>overridePhpSessionLocation</code> to true, then the session files will be saved in <code>craft/storage/runtime/session</code>. Just be aware there is a bug in PHP that will prevent session garbage collection from running if you override the default session save path (which is what that config setting does). So you'll want to provide your own external method of session file garbage collection.</p>
  
  <p>So, your options are to 1) enable sticky session as the load balancer level to ensure that a user will always get sent back to the same server that their session was created on or 2) provide an external shared storage drive that all of your web servers can write the PHP session files and point each web server to use that.</p>
  
  <p>Personally, I'd just enable stick sessions.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-20T17:06:47.903Z
Answers.LastActivityDate: 2015-04-20T17:06:47.903Z
Answers.UserDisplayName: Brad Bell
Body: <p>We have a single DB and multiple web servers and are finding that unless we enable sticky sessions on the load balancer, we aren't able to login (or we can login then lose the session).</p>
  
  <p>I can see a sessions table and there appears to be no config setting, so what might be going wrong here?</p>
  
  <p>Do we need to set overridePhpSessionLocation to false?</p>
  
Tags: <session>
Title: Unable to login on multi-node install
ThreadText: # Unable to login on multi-node install
  
  (Asked by: username_0 on 2015-04-20)
  
  We have a single DB and multiple web servers and are finding that unless we enable sticky sessions on the load balancer, we aren't able to login (or we can login then lose the session).
  
  I can see a sessions table and there appears to be no config setting, so what might be going wrong here?
  
  Do we need to set overridePhpSessionLocation to false?
  
  **Tags:** session
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-20. Score: 3
  
  As of Craft 2.3, [overridePhpSessionLocation](http://buildwithcraft.com/docs/config-settings#overridePhpSessionLocation) is set to false by default. Meaning that wherever Apache (or whatever web server you're using) and PHP is configured to save the PHP session files, that's where they will go.
  
  If you set `overridePhpSessionLocation` to true, then the session files will be saved in `craft/storage/runtime/session`. Just be aware there is a bug in PHP that will prevent session garbage collection from running if you override the default session save path (which is what that config setting does). So you'll want to provide your own external method of session file garbage collection.
  
  So, your options are to 1) enable sticky session as the load balancer level to ensure that a user will always get sent username_0 to the same server that their session was created on or 2) provide an external shared storage drive that all of your web servers can write the PHP session files and point each web server to use that.
  
  Personally, I'd just enable stick sessions.
  
  
  ---
  
  