0

This question already has an answer here:

Got warning from server regarding Disk space getting full.

After checking into file manager I found 17.2 GB of file size in session folder.

When looked into var/session folder, I can see unusual size ranging from 400 MB to 2.5 GB and years of these files as 2031, 1987, 1970, 1990.

Is it normal to have session files with size 2GB and greater?

Even unable to delete these unusual session files (Response: 550 Could not delete sess_2fjtnha6k4be02r2p1ofdh1qt4: Invalid argument)

Any suggestions?

marked as duplicate by Manoj Deswal, Amit Bera, brentwpeterson, Murtuza Zabuawala, liyakat Nov 15 '17 at 11:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @MagenX : No it doesn't answer my question, the code will not delete the files which have their date as from future. please read questions carefully before marking them duplicate. – Wasiq Shahrukh Nov 10 '17 at 8:58
1

Clear it once or twice a day just to be safe

Don't. Unless you intentionally want to disrupt sales by obliterating customer carts.

I put sessions in RAM

Don't. This is a common (and dangerous) Magento myth.

  • If its a single-sever deployment, use files and don't look back.
  • If its multi-server, use Redis.

Memcache should not be considered unless either you care not for persistence, or you are hitting the single threaded behaviour of Redis (very unlikely).

Traffic is around 2k-5k

Session files are often ~5kB, if you are using 256,000kB, then that's around 50k per user, something isn't right.

I wouldn't be largely concerned about session storage utilisation, if its consuming space, so be it. I'd only be worried when you start seeing >2GB utilisation and it becomes a performance bottleneck.

Is there a way to check this

Open one of the largest session files in a text editor and you'll find the cause. It will be a rogue 3rd party extension storing information in sessions that perhaps shouldn't be.

  • Even then we couldn't find how does those files got date as from future 2031 and very past 1971 – Wasiq Shahrukh Nov 3 '17 at 9:46
  • timestamp comes from your environment, system config and storage location.... – MagenX Nov 10 '17 at 10:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.