from past two days i am facing this problem. whenever i restart my sails server session got expired and all users got logged out. Is there any way to overcome from this ? I have gone through the sails doc but not successful to save the session in database.
Whenever i restart sails server session got expired how to save session in database?
186 Views Asked by Ankur At
2
There are 2 best solutions below
Related Questions in NODE.JS
- How to solve CERT_UNTRUSTED error in nodemailer
- Run a loop over a callback, node js
- Implementing prerender.io middleware in sails.js
- Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
- formatting path string in javascript
- One to One screensharing using WEBRTC
- Create polygon from grid (for collisions)
- Strange npm behavior when installing packages like grunt
- Convert JSON.gz to JSON in node js
- "Your npm version is outdated." but it's not. While install yo
- Why put methods on the prototype of a class instead of declaring them in the constructor?
- Node JS Async Response
- mongoose get property from nested schema after `group`
- Cannot Receive Incoming call on Twilio android Client
- How can I change a specific line in a file with node js?
Related Questions in SESSION
- Access property of an object of type [Model] in JQuery
- __PHP_Incomplete_Class Object even though class is included before session started
- Safari Extension not geting session Info
- Laravel: Locale Session: Controller gets Parameter to change it but it cant. U have to hardcode it
- Does OPEN SYMMETRIC KEY (SQL Server) remain in scope on a server farm?
- Superagent share session / cookie info with actual browser
- Session Destroyed on page refresh
- MVC Referencing strongly typed session objects on my view
- What is the best way to persist a global array in php?
- Error in indicies while unsetting Sessions
- Server side PHP session is not working in android
- Laravel - session data survives log-out/log-in, even for different users
- The page isn't redirecting properly when I logout
- Session array unset and delete row
- Validating a login using PHP
Related Questions in SAILS.JS
- Implementing prerender.io middleware in sails.js
- Sails.js CORS for post method
- how to integrate sails.js with a project based on mean.js boiler plate
- Sails JS Blueprints allow Update operations on primary key
- sails.js enable compression
- Sails JS - How to Work With Specific Model Attributes from the Associated Controller
- Unable to reset model instance attribute in sailsjs
- How to access information in Sails after creation?
- Constant 'in' values as REST API value at ease
- Find in collection/object - SailsJS and Waterline ORM
- integrating sails with OTP login (passwordless)
- Amending req.options in a sailsjs policy
- Middleware between passport and angular
- Sailsjs login API
- Getting error: Must specify an `id` when calling `Model.room(id)` with Sails.js Pub/Sub
Related Questions in SAILS-MONGO
- Find in collection/object - SailsJS and Waterline ORM
- Model with unique attribute is being created twice
- How to properly debug the response lifecyle in Sails.js?
- How to find specified fields in mongodb in sails?
- publishcreate, publishupdate does not work on associated collection in sailsjs
- Why wouldn't a waterline callback happen to be triggered?
- How to overwrite object Id's in Mongo db while creating an App in Sails
- Sails/Waterline populate does not work in junction table?
- How to mark read messages?
- how to install sails auth for manually configured mongoose ORM
- Using different mongo database than admin in sails
- How can I select different databases for a model based on request parameters in Sails.js?
- Sails.js save multiple associations
- How to perform a sorting with case insensitive in the sails js framework?
- Sails.js associations: "Many" side of one-to-many associations not saving to MongoDB or Postgres (vs. disk db)
Related Questions in CONNECT-MONGO
- Mongoose - Searching Schema via findOne() unsuccessfully
- Express session secret - from client to server?
- connect-mongo cross-domains session issue
- Handle database error when using connect-mongo
- Updating express-session sessions
- Express-session and tokens in one project
- Cannot get value of req.user for Passport.js
- secret key on storage session does not work
- Express-session with connect-mongo MongoServerSelectionError
- req.session object is not being created even after initialization in Express
- req.session forgets req.session.isAuth after being set in previous route
- Authentication Issue: Passport.js Local Strategy Not Redirecting to Profile Route
- Connect-mongo package with Jest leads to error "Jest did not exit one second after the test run has completed"
- MongoStore: Cannot Init Client. Not accepting mongoose connection object
- Whenever i restart sails server session got expired how to save session in database?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
EDIT: There seems to be a bug in
sailsthat's preventing mongo session store from working as expected.EDIT2: The documentation repository has been updated and the website should be updated soon as well.
You need to use mongo-connect v0.8.2 if you're using node <=0.12.x, and mongo-connect >= v1.0.0 if you're using node >= v4.x
You will have to update your sessions configuration
To use mongo as a session store, install the
connect-mongopackage as a dependencyThen in
config/sessions.js