Closed agtabesh closed 3 years ago
You have to manually write a script to delete the old files by comparing their mtime. Also, I think, redis will be wiser choice in this scanerio
@thetutlage Is it natural to take all 3 Gigabytes of space for 50k users within less than 20 days (assuming all users logged in within these 20 days)?
according to ext4 file system sector size, 512 bytes, (sessions file are less than that but the whole sector will be equipped) and our 3 Gigabytes space, we can store more than 6 millions session file which is far from our need unless adonisjs create separate session file for each users page view.
Hard to comment from my side, since I cannot see how many files are there. It will require some debugging on your end and report if unnecessary are getting created and on which event the files are getting created
Closing since no response from the issue reporter and not actionable as well
Package version
3.0.7
Node.js and npm version
v10.24.0
I'm working on a project in which there are almost 50k users which most of them are logged in. The proplem is that the
sessions
folders size keeps increasing day by day and I think the reason is that adonisjs create a new session file while keeping the old ones. after 1 week the size ofsessions
folder is3GB
. If it helps, I set session age to90d
.