You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I set the session and socket stores (or one of them) to use Redis as the adapter, and Redis goes down (for whatever reason), sails has an un-handled exception and crashes. It's actually really easy to fix this and make Sails display a 500 page while Redis is down, and then when it comes back up, just re-connect.
I am doing the work for this and will submit a pr, but have two questions:
I can't find the place in the code where a request is routed through the session store so that I can respond with a 500 instead of going to an already shutdown Redis client which throws the error: Unable to parse HTTP body- error occurred :: 'Redis connection gone from close event.' - can anyone point me to it?
I was thinking about auto-switching to memory adapter while redis is down, and then putting the adapter back to redis when it came back online. What are the thoughts around this? The biggest caveat is that it makes life difficult around clusters, because sessions would not be shared...
Steps to reproduce current bug:
Make sure you have configured Redis as the session store (and the socket store)
sails lift (while redis is running)
go to a page on your app, or any route that works - it works
now shutdown redis
sails has crashed
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
If I set the session and socket stores (or one of them) to use Redis as the adapter, and Redis goes down (for whatever reason), sails has an un-handled exception and crashes. It's actually really easy to fix this and make Sails display a 500 page while Redis is down, and then when it comes back up, just re-connect.
I am doing the work for this and will submit a pr, but have two questions:
I can't find the place in the code where a request is routed through the session store so that I can respond with a 500 instead of going to an already shutdown Redis client which throws the error: Unable to parse HTTP body- error occurred :: 'Redis connection gone from close event.' - can anyone point me to it?
I was thinking about auto-switching to memory adapter while redis is down, and then putting the adapter back to redis when it came back online. What are the thoughts around this? The biggest caveat is that it makes life difficult around clusters, because sessions would not be shared...
Steps to reproduce current bug:
sails lift
(while redis is running)Thanks!
The text was updated successfully, but these errors were encountered: