Rails Nginx and Thin - why don't users get logged off when recycling? -


i have rails app running on ubuntu, nginx, , thin.

when stop nginx , stop thin servers, $ cap deploy , restart thin , nginx, expect user have log in. but, don't.

is there way force them log-in again?

thanks!

users don't have log in because sessions stored in persistent session store (typically database) rails doesn't modify between deployments. logged-in user's browser send cookies on every http request, , rails authenticates these cookies against session store. force users log in have modify session store either deleting records or changing expiration time.

assuming storing sessions in database using activerecord,

rake db:sessions:clear 

should force expire existing sessions deleting rows in table stores sessions.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -