Hey, has anyone had an issue, where session is lost after first redirect after successful login? This only happens when using database for storing session, if I use file - no issues. Also, I can see a record in a database after login with correct user id, but after redirect, next record is null.
Any help is appreciated!
@slamdalius can you be more clear there, it think the issue may be that you are unsetting the session after you have stored in db it is reflecting while you are trying to redirect.....
@shez1983 idea is to have multiple instances in a cluster controlled by a load balancer. It means that every instance will have separate session files and a user will lose his session every time load balancer passes him to another instance. If session was stored in a database, all instances could act as one - read and write same database.
@slamdalius ok that makes sense BUT what you could do is have a redis instance on one server (separate server) and then connect to it via all your instances... Redis is probably faster, more efficient and build for session.. just an idea
is your encryption key in you .env same for ALL instances? thats all i can think of..