title: 503 Service Temporarily Unavailable on Magento after Clearing Cache
body: <p>After clearing the cache in Magento under admin I am left with a 503 error, "Service Temporarily Unavailable". To be clear, this was caused by clearing the cache, <code>'var/cache'</code>. This is not related to the Maintenance issue that can result in the same or similar problem (resolved by removed <code>maintenance.flag</code> file). There is no maintenance flag present in the root of the application. I've tried researching this issue and it seems like every post refers back to the Maintenance issue. </p>
  
  <p>One thing to note; the 503 error is Web Server generated. The Maintenance issue returns 503 however it is the application (Magento) which returns it; so you see the application logo, links, et al..</p>
  
  <p><a href="https://i.stack.imgur.com/ld6xI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ld6xI.png" alt="503 Error"></a></p>
  
  <p>I've checked the Web Servers logs and the following error is being generated:</p>
  
  <pre><code>539 access forbidden by rule, client: 165.225.138.177, server: , request: "POST /app/etc/local.xml HTTP/1.1"
  </code></pre>
  
  <p>I checked the file and it seemed obvious to me this was due to an ownership conflict; I changed the file owner however the problem persists. </p>
  
  <p>Checking the Magento error logs, <code>var/reports</code>, I see the following error:</p>
  
  <pre><code>the error log (var/reports) reflects the following error: "Mage registry key "_singleton/" already exists"
  </code></pre>
  
  <p>the full error is:</p>
  
  <pre><code>a:5:{i:0;s:46:"Mage registry key "_singleton/" already exists";i:1;s:1157:"
  #0 /data/html/app/Mage.php(223): Mage::throwException('Mage registry k...')
  #1 /data/html/app/Mage.php(477): Mage::register('_singleton/', false)
  #2 /data/html/app/code/core/Mage/Core/Model/Factory.php(81): Mage::getSingleton(false, Array)
  #3 /data/html/app/code/core/Enterprise/UrlRewrite/Model/Url/Rewrite.php(94): Mage_Core_Model_Factory-&gt;getSingleton(false)
  #4 /data/html/app/code/core/Enterprise/UrlRewrite/Model/Url/Rewrite/Request.php(114): Enterprise_UrlRewrite_Model_Url_Rewrite-&gt;loadByRequestPath(Array)
  #5 /data/html/app/code/core/Enterprise/UrlRewrite/Model/Url/Rewrite/Request.php(58): Enterprise_UrlRewrite_Model_Url_Rewrite_Request-&gt;_loadRewrite()
  #6 /data/html/app/code/core/Mage/Core/Model/Url/Rewrite/Request.php(116): Enterprise_UrlRewrite_Model_Url_Rewrite_Request-&gt;_rewriteDb()
  #7 /data/html/app/code/core/Mage/Core/Controller/Varien/Front.php(165): Mage_Core_Model_Url_Rewrite_Request-&gt;rewrite()
  #8 /data/html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front-&gt;dispatch()
  #9 /data/html/app/Mage.php(684): Mage_Core_Model_App-&gt;run(Array)
  #10 /data/html/index.php(83): Mage::run('default', 'store')
  #11 {main}
  ";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
  </code></pre>
  
  <p>Can anyone provide any input on what could cause this?</p>