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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved ten thousands sessions files?!

    Snipe-IT
    3
    7
    238
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • imc67
      imc67 translator last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        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.

        imc67 1 Reply Last reply Reply Quote 0
        • imc67
          imc67 translator @nebulon last edited by imc67

          @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

          1 Reply Last reply Reply Quote 0
          • imc67
            imc67 translator last edited by

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

            1 Reply Last reply Reply Quote 0
            • girish
              girish Staff last edited by

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

              1 Reply Last reply Reply Quote 0
              • girish
                girish Staff last edited by

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

                imc67 1 Reply Last reply Reply Quote 1
                • imc67
                  imc67 translator @girish last edited by

                  @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 !!!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB