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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Leantime
  3. Leantime sessions-store growing fast and endlessly

Leantime sessions-store growing fast and endlessly

Scheduled Pinned Locked Moved Leantime
healthcheckdocker-volumessessions
13 Posts 5 Posters 2.3k Views 5 Watching
  • 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.
  • leantimeL Offline
    leantimeL Offline
    leantime
    wrote on last edited by
    #4

    Hey, Leantime maintainer here. Thought it might be a good time to chime in.
    Leantime doesn't do anything special for session handling. So it appears that this would be related to the php config. More than likely it is the combination of.

    session.gc_lifetime
    session.gc_divisor
    session.gc_probability
    

    https://www.php.net/manual/en/session.configuration.php

    Leantime.io | Open Source Project Management

    M 1 Reply Last reply
    2
    • leantimeL leantime

      Hey, Leantime maintainer here. Thought it might be a good time to chime in.
      Leantime doesn't do anything special for session handling. So it appears that this would be related to the php config. More than likely it is the combination of.

      session.gc_lifetime
      session.gc_divisor
      session.gc_probability
      

      https://www.php.net/manual/en/session.configuration.php

      M Offline
      M Offline
      msbt
      App Dev
      wrote on last edited by msbt
      #5

      @leantime thanks for chiming in!

      As suspected, after looking at the timestamps, this has to be the healthcheck:

      3af3ccc7-23a7-40ee-9105-03a935277283-image.png

      The files from 08.12.2023 are still there, so it seems there is no limit (or at least not reached yet), after 426k files. Any suggestion what I should try @nebulon? Or a different kind of healthcheck which doesn't produce a session file on every ping? 😉

      1 Reply Last reply
      1
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #6

        @leantime thanks for joining in here and good observation about the healthcheck. @leantime is there a better way to do this instead of just testingg for a 200 status code on / ?

        Currently running through the leantime v3.0.0 tests, will see what can be done about session lifetime, but yes ideally they shouldn't be created in the first place.

        1 Reply Last reply
        2
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #7

          The latest package has a session timeout set of 1 week now, so this should remedy the situation at least partly.

          1 Reply Last reply
          3
          • nebulonN nebulon marked this topic as a question on
          • nebulonN nebulon has marked this topic as solved on
          • fbartelsF Offline
            fbartelsF Offline
            fbartels
            App Dev
            wrote on last edited by
            #8

            This problem still seems to exist, in addition to the state files being created in /run/leantime/sessions I also see these warnings in /app/code/logs/error.log:

            [17-Mar-2024 10:45:28 UTC] PHP Warning:  session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /app/code/app/Core/Session.php on line 86
            [17-Mar-2024 11:00:28 UTC] PHP Warning:  session_start(): open(/var/lib/php/sessions/sess_faca93109effa1af1edd88e4f44a6907151835e9-5a1a3dac769201a6b925ba01be7303f4dc33a595, O_RDWR) failed: Read-only file system (30) in /app/code/app/Core/Session.php on line 86
            

            When looking at /etc/php/8.1/apache2/php.ini I do find session.save_path = /run/leantime/sessions, so it is strange that it still tries /var/lib/php/sessions/ for that.

            1 Reply Last reply
            1
            • nebulonN nebulon has marked this topic as unsolved on
            • nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #9

              Looks like upstream just uses symfony sessions, which in turn should use the php settings as mentioned in https://symfony.com/doc/current/session.html#configuring-garbage-collection

              Does anyone here have more experience with the symfony framework?

              1 Reply Last reply
              1
              • fbartelsF Offline
                fbartelsF Offline
                fbartels
                App Dev
                wrote on last edited by
                #10

                I did not yet review the whole source of the app, but the session messages seemingly stopped after I added the session.save_path in /app/data/php.ini and restarted the app. Maybe the wrong php.ini is used by default?

                1 Reply Last reply
                2
                • M Offline
                  M Offline
                  msbt
                  App Dev
                  wrote on last edited by
                  #11

                  @fbartels did you get that sorted and does it work for you? I have to still have troubles with it and I need to manually check every few weeks which docker container is using up the space and manually remove old sessions:

                  35G /var/lib/docker/volumes/id/_data/leantime/sessions

                  my php.ini has the following content:

                  session.save_path = /run/leantime/sessions
                  session.gc_probability = 1
                  session.gc_divisor = 100
                  session.gc_maxlifetime = 1440
                  
                  girishG fbartelsF 2 Replies Last reply
                  1
                  • M msbt

                    @fbartels did you get that sorted and does it work for you? I have to still have troubles with it and I need to manually check every few weeks which docker container is using up the space and manually remove old sessions:

                    35G /var/lib/docker/volumes/id/_data/leantime/sessions

                    my php.ini has the following content:

                    session.save_path = /run/leantime/sessions
                    session.gc_probability = 1
                    session.gc_divisor = 100
                    session.gc_maxlifetime = 1440
                    
                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #12

                    @msbt not a real solution, but a hack is to clean out /run/leantime/sessions with the cron job maybe ? https://docs.cloudron.io/apps/#cron

                    1 Reply Last reply
                    1
                    • M msbt

                      @fbartels did you get that sorted and does it work for you? I have to still have troubles with it and I need to manually check every few weeks which docker container is using up the space and manually remove old sessions:

                      35G /var/lib/docker/volumes/id/_data/leantime/sessions

                      my php.ini has the following content:

                      session.save_path = /run/leantime/sessions
                      session.gc_probability = 1
                      session.gc_divisor = 100
                      session.gc_maxlifetime = 1440
                      
                      fbartelsF Offline
                      fbartelsF Offline
                      fbartels
                      App Dev
                      wrote on last edited by
                      #13

                      @msbt said in Leantime sessions-store growing fast and endlessly:

                      did you get that sorted and does it work for you?

                      I am not using it myself, but one of my customers does on their Cloudron. since the customer was happy with the workaround and did not complain about further issues I did not make any further research on this.

                      1 Reply Last reply
                      0
                      • girishG girish marked this topic as a regular topic
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search