Inodes in Sessions Directory

Jerry Jones's Avatar

Jerry Jones

28 Oct, 2016 04:21 PM

Hey Marcin,

We ran into an issue the other day I'm hoping you can clarify. We ran out of memory on one of our servers. After some digging we found a unusually large amount of space being used in the sessions directory. These appear to house inodes used by MySQL however some of them appear to be very old.

We've decided to create a chron job that removes those older than 2 weeks old everyday to not continually eat up disk space but we think this is less than ideal. What are these inodes in this directory and is there an issue with how we are removing the files now?

  1. Support Staff 1 Posted by Marcin Kuzminsk... on 28 Oct, 2016 05:19 PM

    Marcin Kuzminski's Avatar

    Hi Jerry,

    Yes it's a common problem with file based session. it's safe to delete those file, however i'd recommend fully to switch to database sessions, which simply are self-cleaning

    as example how to do it is here:


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac