title: Intermittent Magento Errors
body: <p>We are having issues with our staging machine, which is running <code>Magento EE 1.13.1</code></p>
  
  <p>The problem started happening Tuesday afternoon.</p>
  
  <p>At that time we updated an installed php / mysql application.</p>
  
  <p>On the main magento site, the browser is redirected to the magento install page.</p>
  
  <p>The problem occurs only within the Magento application and is related to sessions – when the error occurs, magento throws a fatal similar to this:</p>
  
  <p>(I created a small test application to try to isolate the problem).</p>
  
  <blockquote>
    <p>Fatal error: Call to a member function getCode() on a non-object in /var/www/html/app/code/core/Mage/Customer/Model/Session.php on line 71 </p>
  </blockquote>
  
  <pre><code>Call Stack: 0.0002 653728 
  1. {main}() /var/www/html/t.php:0 0.3013 8153600 
  2. Mage::getSingleton() /var/www/html/t.php:20 0.3013 8153912 
  3. Mage::getModel() /var/www/html/app/Mage.php:477 0.3013 8153912 
  4. Mage_Core_Model_Config-&gt;getModelInstance() /var/www/html/app/Mage.php:463 0.3016 8302032 
  5. Mage_Customer_Model_Session-&gt;__construct() /var/www/html/app/code/core/Mage/Core/Model/Config.php:1348
  </code></pre>
  
  <p>The issue only occurs intermittently, and we can temporarily fix it by stopping and starting the httpd service.</p>
  
  <p>We are running magento ee 1.13.1, php 5.3.3, and httpd 2.2.15</p>
  
  <p>This is happening on a staging machine. Our production machine which has the same system and code on it, it working correctly.</p>
  
  <p>We have tried to turn on/off magento compiling, caching, php apc, changed the php sessions to use the disk rather than /tmp/fs, and changed magento to use the DB for its sessions.</p>
  
  <p>The site fails after several minutes.</p>
  
  <p>There are no errors in the system logs.</p>
  
  <p>Can someone suggest how to debug this?</p>