Hello Linode Community.
So I am encountering a very weird problem when hosting my nextjs powered by express with openlitespeed. Everything works great in production, except one thing - the authentification of sessions. The user is saved in tje cookies crorrectly and it works if you are not idle for more than a minute on the page you are on, but if you are idle for more than a minute, then the request is not authenticated anymore even though the cookie is still there. I am using redis for my cookie store, and everything works in local testing, where openlitespeed is not preset. The authentification I am using is passportjs with express-session. Have any of you encountered this problem, and if so, how did you solve it?
I habe tried disabling the cache module, set all timeouts to a higher value or disabling them, use different memorystores and more, but no luck
Hey there -
This is a bit out of my area of expertise, but I wanted to see if I could pass along some resources that might be able to help you out, or get you pointed in the right direction. I also want to keep this open for other members of the Linode Community to respond to, so I've added some tags to this post to give it more visibility.
The first thing I wanted to link to you is Litespeed's server optimization page. You may have already visited the site, but it looks like it's a good resource for configuring your server for timeouts:
Here is another post in the Litespeed forums that addresses timeouts:
These are just some suggestions to get you pointed in the right direction. Please let us know in this thread of any successes/failures you have with this so we can continue to help as best we can.