Laravel Auth Session logs me out after a period of time

Users in my application are getting logged out after a period of time although i have set the environment variable SESSION_LIFETIME = 525600

There are 100+ concurrent users in the application

The SESSION_DRIVER is set to file, i have read that changing to database and creating the php artisan session:table migration will make it work.

What could be the problem?


Locally this does not happen.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

So changing the SESSION_DRIVER = database and using php artisan session:table fixed the issue and now everything works as expected.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x