Suddenly the session on our live site stopped working. Do not know why this is happening.

Our site is hosted on AWS EC2 Linux

var and var/session folder exists and have permission 777

nothing there in exception.log or system.log

cache folder is cleared and have permission 777

Cannot login as customer, admin and add to cart not working

  • php error logs? disk space? cached/wrong form_key? cookie value and session are the same?
    – user2857
    Mar 8, 2015 at 15:54
  • for more information, try stackoverflow.com/a/7474767/2375207 Jun 25, 2015 at 8:12
  • if you clear out your var/session directory do new session files get created when you try to log in? Jun 25, 2015 at 8:54

5 Answers 5


If you are using Google Chrome, you can right-click on the page, choose Inspect Element, then Resources tab, look for Cookies down the left-hand menu, and click on your domain name.

Under the domain name, the cookies that have been set for it will be displayed, along with path, expiry, etc. Very useful.

In your case, you are looking for the 'frontend' session cookie under 'name'. You can delete it, and refresh the page to see if Magento recreates it, in which case sessions are probs working. Hope that helps :)

PS: Magento uses sessions very heavily, if they're broken other things will be breaking all over the show as well.

Also follow bellow links



I hope this will help you.

  • Good suggestions. Determine if sessions sre actually working, and that values are just not retained / or that a new sedsion is constantly created. This may be of interest: magento.stackexchange.com/questions/385/…
    – ProxiBlue
    Dec 25, 2015 at 11:03
  • if you are happy with answer than give +1 or accept answer and any help needed comment here. i am here. Dec 25, 2015 at 11:07

This can happen when your disk runs out of available inodes. Debian based systems change the way that PHP sessions are garbage collected. With the default settings for PHP session garbage collection, Magento file based sessions won't be cleaned up. This can lead to a very large number of session files, which if left unchecked, can overrun the available inodes on the disk. The disk will have available space, but is unable to create new files.

Use df -i to check the number of inodes in use.


It happened to me as well and I fixed this by changing the /var/ folder permission to 777 instead of 755.

Hope this will help someone.


In regards to the Magento session issues, no one mentions the cookies could be incorrectly setup in the DB. We wasted a morning on this after we imported a DB update that had the wrong cookie domain.

Make sure your core_config_data table has the right setting for this path value:


The domain should match what you have in the URL.


web/cookie/cookie_domain = .myawesomemagentosite.com

In your index.phpthere is an included file that somehow might be starting another session – therefore telling Magento not to bother (not to bother calling session_start()) – this leads to the website displaying correctly, but no ability to add products to cart or login to the admin – nor any error message!

To fix this all you have to do is to add the following line to index.php below where you were including some custom file and above where Magento was being called.

require_once('some/dodgy/session/starting/file.php'); unset($_SESSION);

  • We did not include any custom file. Also, I added unset($_SESSION) just before this line: $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; but no luck. I cleared cache and permissions are 777 :( Mar 8, 2015 at 19:53

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.