Session cleanup

Is there any session cleanup mechanism? Or do I need to manually clean them up? I noticed sessions have expiresAt, but they don't get deleted from the DB once they expire.
6 Replies
sebastian
sebastian3mo ago
the session gets autodeleted if user try to access the expired session
momoneko
momonekoOP3mo ago
So if expired sessions are never accessed, they'll just pile up in the database?
sebastian
sebastian3mo ago
I guess so, have you checked the documentation?
momoneko
momonekoOP3mo ago
The documentation doesn't mention anything related to session cleanup, as far as I could find. That's why I'm asking here
sebastian
sebastian3mo ago
So there's probably no automatic cleanup if you dont count the session deletion after user check. You can do a simple cron job if the stacked sessions are a problem.
kingitaj
kingitaj3mo ago
I believe all old sessions are cleaned up once a user tryies to access a session

Did you find this page helpful?