This project is archived and is in readonly mode.

#2644 ✓stale
jerrett

Memcache session store + litespeed (and i think passenger)

Reported by jerrett | May 14th, 2009 @ 02:22 AM | in 2.x

Using litespeed (and from searching the internets, it looks like passenger does the same thing) forks the parent process to create children, the following check:

unless @pool.servers.any? { |s| s.alive? }
 raise "#{self} unable to find server during initialization."
end

causes it to connect to the servers right away, which then requires the connection to be killed before forking the child processes.

While this is solvable in code (In litespeed by modifying their built in RailsRunner.rb, and in Passenger by following the info in the link below), I believe the issue is avoidable by removing the alive check, or at least moving it somewhere that doesn't get fired as soon as you setup your memcache store in environment.rb.

MemCacheStore in ActiveSupport::Cache doesn't suffer the same problem, because it doesn't do the alive check after it creates the MemCache object, and MemCache doesn't connect until it has to.

http://www.modrails.com/documentation/Users%20guide.html#%5Fexample...

With Litespeed the "odd behavior" that I was experiencing was users getting other users sessions.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages