Skip to content

gc_probability and cache sessions directory growing endlessly #10349

@zefrog

Description

@zefrog

Hello,

I spent a few hours debugging my system the other day because my disk was full - not because of space but because of inodes. In fact, it was the cache sessions directory that was full of sess_* files.

As it was already stated in pr #1097, on systems like Debian, the default session.gc_probability is defined to 0, and a cron task takes care of the /var/lib/php5 directory, which is the default session.save_path.

But by default, Symfony changes that behavior and puts the sessions in the cache directory of the environment, which is then never garbage collected. If you don't "cache:clear" your environment periodically, you'll be running out of inodes sooner or later (I had some scripts using my webservices, which created sessions over and over again).

I think this issue should be at least documented in session management of the HttpFoundation. But maybe I could also modify the cache:clear task or create a new one, that would only run the garbage collection of sessions. Or do you think it is enough to document that you need to modify the /etc/cron.d/php5 file to change the directory and add more lines for the different environments ?

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy