Magento – var/session/ session files are empty

cachesession

We have a weird problem. On a site at random times the sessions files on the site are empty, 0 kb.
After removing/clearing the cache the sessions get back to about 2.2kb.

I have no clue to figure out what is the trigger when this happens.

On the times the session are empty no one can login or add stuff to cart. The admin login also doesn't appear to work at those times.

Does anybody have an idea?

Session files are stored in /var/session/
It's Magento 1.7.0.0
The Google bot is also quite bussy indexing.
The server is in our controll and run 3 other shops without problems.
At launch we didn't have this problem. When it started there where no files edited in a few weeks prior. And the changes where mostly templating

How we solved it, sort of…
we moved to an other host, no problems there.

Best Answer

Move your sessions in the memcached. It's saving sessions in memory, so it's working faster than from filesystem. Also you will have ability use few servers instead one. Memcached has one issue. When server reboots - users will lose their sessions. More information here: http://magebase.com/magento-tutorials/magento-session-storage-which-to-choose-and-why/