Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.

SOLVED ten thousands sessions files?!

  • in the /data/storage/framework/sessions folder there are currently 69.831 items, each about 650 bytes all together now 47.1 MB.

    Is this normal?

    We added now only about 110 assets and only 1 active user and 2 users just looked around for a few minutes.

  • Staff

    That indeed does not look right. Can you see if you adjust the SESSION_LIFETIME=12000 to be say 10 in /app/data/env would this eventually purge some? Tbh I am not 100% what the value is, but I assume it is seconds.

    If those are not cleaned up, we may have to put that session folder in /tmp which is purged automatically after some time.

  • @nebulon thanks! I've changed it to 10 and after some time it got cleared, although in a few minutes there are already 120 new ones without hardly any activity

    update: while clicking around in the UI and checking files again they get cleared, amount is 79 at this moment

  • I don’t think this is a permanent solution as a user gets really quick logged out 😉

  • Staff

    I can move the sessions to the database or redis, since it's a standard laravel app.

  • Staff

    @imc67 I moved the sessions to redis in the new package.

  • @girish said in ten thousands sessions files?!:

    @imc67 I moved the sessions to redis in the new package.

    This seems to work!!! After update there came no more new session files, after half an hour I deleted all session files from folder and no new ons appeared. Also returned to 12000.

    It all looks stable and fast!

    Thanks @girish !!!