How do I get nginx and phusion passenger to maintain sessions between 2 rails instances?

We generally have passenger_max_pool_size 2 unless we leave it out entirely (taking the default setting) and the two settings you're specifying passenger_pool_idle_time and passenger_max_instances_per_app we also leave to the default The session key should be kept in a cookie so Rails can look it up between requests. Assuming that's working properly, the problem is that multiple Rails instances aren't sharing memory (feature, not a bug - they're processes, not threads) and therefore don't share session data. Try moving your session information into ActiveRecord: Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rake db:sessions:create") ActionController::Base.

Session_store = :active_record_store (the above code is in config/initializers/session_store. Rb ) That way, because the data store is accessibly to multiple Rails processes, they should all have access to the same pool of active sessions.

We generally have passenger_max_pool_size 2; unless we leave it out entirely (taking the default setting) and the two settings you're specifying, passenger_pool_idle_time and passenger_max_instances_per_app we also leave to the default. The session key should be kept in a cookie so Rails can look it up between requests. Assuming that's working properly, the problem is that multiple Rails instances aren't sharing memory (feature, not a bug - they're processes, not threads) and therefore don't share session data.

Try moving your session information into ActiveRecord: # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rake db:sessions:create") ActionController::Base. Session_store = :active_record_store (the above code is in config/initializers/session_store. Rb) That way, because the data store is accessibly to multiple Rails processes, they should all have access to the same pool of active sessions.

For better performance, you should avoid :active_record_store and use memcached instead config. Action_controller. Session_store = :mem_cache_store.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions