I have the same problem as here: Cart dropping all items / cart session clears

Although the answer seems to work for the questioner, for me it doesn't. I have really tried "everything" now:

  • Set session.gc_maxlifetime to 12 hours
  • Changed Magento session storage from db to files
  • Set all Magento cookie validation settings to "No"
  • Cleaned all caches, and cache storage (memcached)
  • Validated that the session lifetime in cookie is using the gc_maxlifetime setting

In detail, the session gets cleared after some seconds of inactivity. If I do a fast "developer checkout" within a few seconds, I have no problems to checkout. But as you surely know not all customers are fast in typing and so on. The furthermore strange thing is, that after this happened once, it is working again for the next one or two times.

I would really appreciate any kind of idea to this.

2 Answers 2


This really sounds like garbage collection to me. Instead of setting GC timeout, move sessions to Memcached or to MySQL. Make sure you're not running filesystem sessions on TmpFS. If this is happening only in Production, again, this hints to me like a garbage collection issue.

If the issue persists I would suggest that you disable all local modules and switch to the default theme as a means of debugging.


I'd try monitoring the cookie(s) set for the domain. If there's something about your system that's causing Magento to invalidate and/or regenerate the cookie set for the session, it may explain the behavior. Watching the session cookie to make sure it keeps it's value would be step one in confirming this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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