As i am facing these issue : Browser Cookies are killing our LIVE site

i need some information about var/session folder. when i googled it, session folder contains customer login details and their items added to the cart. each file will be having one customer details.

when we delete session folder, items added to the cart will remove.

1)suppose if we don't delete session folder, how long these cart items will be present in customer account?

2)For how many days once, we have to delete session folder ?

3)Whats is the advantage and disadvantage of keeping sesion folder long time?

1 Answer 1

  1. Suppose you are deleting session folder, then all login customers & admin users are logout and also cart items are deleted for not login customers (guest) but not effect cart items on login customers because login customers cart items are saved on the database table.
  2. (2 & 3) Each file is one person's session and should last no longer than session.gc_maxlifetime seconds - the garbage collection - set in the server's php.ini file or overridden in an .htaccess file. Lowering this value means fewer sessions will accumulate.

    Magento has another trick concerning sessions; In the app/etc/local.xml file the session_save value can be changed to db meaning the database will be used instead of files but will still respect the aforementioned garbage collector lifetime. Also memcache can be specified if you have set that up (see app/etc/local.xml.additional). Both are very useful if the server is a cluster.

    More details

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.