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, 'var/cache'. This is not related to the Maintenance issue that can result in the same or similar problem (resolved by removed maintenance.flag 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.
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..
I've checked the Web Servers logs and the following error is being generated:
539 access forbidden by rule, client: 165.225.138.177, server: , request: "POST /app/etc/local.xml HTTP/1.1"
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.
Checking the Magento error logs, var/reports, I see the following error:
the error log (var/reports) reflects the following error: "Mage registry key "_singleton/" already exists"
the full error is:
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->getSingleton(false)
#4 /data/html/app/code/core/Enterprise/UrlRewrite/Model/Url/Rewrite/Request.php(114): Enterprise_UrlRewrite_Model_Url_Rewrite->loadByRequestPath(Array)
#5 /data/html/app/code/core/Enterprise/UrlRewrite/Model/Url/Rewrite/Request.php(58): Enterprise_UrlRewrite_Model_Url_Rewrite_Request->_loadRewrite()
#6 /data/html/app/code/core/Mage/Core/Model/Url/Rewrite/Request.php(116): Enterprise_UrlRewrite_Model_Url_Rewrite_Request->_rewriteDb()
#7 /data/html/app/code/core/Mage/Core/Controller/Varien/Front.php(165): Mage_Core_Model_Url_Rewrite_Request->rewrite()
#8 /data/html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#9 /data/html/app/Mage.php(684): Mage_Core_Model_App->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";}
Can anyone provide any input on what could cause this?
First, and this is more for google posterity, make absolutely sure that
There's no maintenance.flag file in the root folder
That your error isn't web server generated (add a test.txt to the root and make sure you can access it)
Assuming you've done the above -- there aren't many places a stock Magento system will return a 503 error. Step 1 should be checking the following
PHP/Web Server error logs for exception messages
The Magento var/log/exception.log exception log
The Magento var/log/system.log exception log
The Magento var/report error report files
for any specific context about the error. It's very possible a third party extension is producing a 503.
Here's some things in a stock Magento install (CE and EE) that produce 503 errors (EE code excluded for vague fear of unclear licensing/fair-use)
If you're using Redis as a caching server and its locking system gets overwhelmed, the system can start producing 503 errors.
#File: app/code/community/Cm/RedisSession/Model/Session.php
// Limit concurrent lock waiters to prevent server resource hogging
if ($waiting >= $this->_maxConcurrency) {
// Overloaded sessions get 503 errors
$this->_redis->hIncrBy($sessionId, 'wait', -1);
$this->_sessionWritten = TRUE; // Prevent session from getting written
$writes = $this->_redis->hGet($sessionId, 'writes');
if ($this->_logLevel >= 4)
{
Mage::log(
sprintf("%s: Session concurrency exceeded for ID %s; displaying HTTP 503 (%s waiting, %s total requests)\n %s (%s - %s)",
$this->_getPid(),
$sessionId, $waiting, $writes,
Mage::app()->getRequest()->getRequestUri(), Mage::app()->getRequest()->getClientIp(), Mage::app()->getRequest()->getHeader('User-Agent')
),
Zend_Log::WARN, self::LOG_FILE
);
}
require_once(Mage::getBaseDir() . DS . 'errors' . DS . '503.php');
exit;
}
The PayPal IPN controller endpoint will throw a 503 if it can't find an order
#File: app/code/core/Mage/Paypal/Model/Ipn.php
if (empty($this->_order)) {
// get proper order
$id = $this->_request['invoice'];
$this->_order = Mage::getModel('sales/order')->loadByIncrementId($id);
if (!$this->_order->getId()) {
$this->_debugData['exception'] = sprintf('Wrong order ID: "%s".', $id);
$this->_debug();
Mage::app()->getResponse()
->setHeader('HTTP/1.1','503 Service Unavailable')
->sendResponse();
exit;
}
//...
}
Enterprise Edition can return a 503 in
app/code/core/Enterprise/Staging/Model/Observer.php
if a content staging configuration value is true.
EE can also return a 503 in
app/code/core/Enterprise/WebsiteRestriction/Model/Observer.php
If you're running in private sales mode and not authorized to see the sale.
I have corrected this issue. After some digging I finally found a Stack post (among many on the same subject) that had the following solution. You can read the post here:
https://magento.stackexchange.com/questions/51598/mage-registry-key-singleton-weee-observer-already-exists
It was suggested to execute these commands:
php -f shell/compiler.php disable
php -f shell/compiler.php clear
php -f shell/compiler.php compile
I toyed with this; including enable/disable and then I deleted the cache, var/cache. When I re-ran the page it worked.
A big thank you to everyone who posted; I feel like everything helped as I ruled out issues and found this resolution.
Additionnally to what has been already proposed, you might want to check that your server has free disk space. I just ran into the issue and it took me 15 minutes to realize the only issue was free space after an automated backup.
Related
I'm working on a medium project -with laravel- for quite a long time now and of course I use the debugger of the framework -laravel-, but now from time to time I see the page of error but there is just "whoops something went wrong without" without any specifications for the error, and I see it a lot in ajax requests, but I just actualize the page and its gone!;
Finally the error show up again and I could see it in my terminal with the command tail down here
this is what I got
[2016-12-28 14:54:04] production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in D:\shop\tess\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php:45
Stack trace:
#0 D:\shop\tess\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php(25): Illuminate\Encryption\EncryptionServiceProvider->getEncrypterForKeyAndCipher(NULL, 'AES-256-CBC')
#1 D:\shop\tess\vendor\laravel\framework\src\Illuminate\Container\Container.php(731): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application), Array)
I've found this on github it helped https://github.com/orchestral/testbench/issues/93
Make sure APP_DEBUG is set to true in your .env file
You can check the errors with the following command tail -f storage/logs/laravel.log Could be different errors
Everytime the cache is cleared using the backend tools, or any module is being enabled, an HTTPD requests is killing the server by overloading it by hundred,
httpd request
load average
once this happens only Forceful Reboot for the server would fix it,
could anyone show me the way how to see which link is being called, and how to track the issue?
No weird modules are installed just the usual, which are: CHAOS TOOLS, INPUT VALIDATION, SEO, ADMINISTRATION MENU, etc.
Server is CENTOS 6.8 x86_64 standard , PHP 5.3, MySQL DB, DRUPAL 7.50, All modules are latest updated,
error logged in apache error log is :
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home/xxxxx/public_html/includes/database/database.inc:2204\nStack trace:\n#0 /home/xxxxx/public_html/includes/database/database.inc(2204): PDOStatement->execute(Array)\n#1 /home/xxxxx/public_html/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array)\n#2 /home/xxxxx/public_html/includes/database/database.inc(2383): DatabaseConnection->query('SELECT expire, ...', Array, Array)\n#3 /home/xxxxx/public_html/includes/lock.inc(167): db_query('SELECT expire, ...', Array)\n#4 /home/xxxxx/public_html/includes/lock.inc(146): lock_may_be_available('theme_registry:...')\n#5 /home/xxxxx/public_html/includes/theme.inc(449): lock_acquire('theme_registry:...')\n#6 /home/xxxxx/public_html/includes/bootstrap.inc(455): ThemeRegistry->set(Array)\n#7 [internal function]: DrupalCacheArray->__destruct()\n#8 {main}\n thrown in /home/xxxxx/public_html/includes/database/database.inc on line 2204, referer: http: //m.facebook.com/
I ran into a problem during an the initial install of magento. I believe it was during the creation of the database tables and it possible timed out.
I dropped all tables in the database and now when I go back to try and do the initial install I get an error:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 179362663215
The error log is as follows:
[code]a:5:{i:0;s:213:"Error in file: "/home/mysite/beta.mysite.com/app/code/core/Mage/Directory/data/directory_setup/data-install-1.6.0.0.php" - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'AD' for key 'PRIMARY'";i:1;s:865:"#0 /home/mysite/beta.mysite.com/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/mysite/beta.mysite.com/app/code/core/Mage/Core/Model/Resource/Setup.php(391): Mage_Core_Model_Resource_Setup->_modifyResourceDb('data-install', '', '1.6.0.2')
#2 /home/mysite/beta.mysite.com/app/code/core/Mage/Core/Model/Resource/Setup.php(289): Mage_Core_Model_Resource_Setup->_installData('1.6.0.2')
#3 /home/mysite/beta.mysite.com/app/code/core/Mage/Core/Model/Resource/Setup.php(269): Mage_Core_Model_Resource_Setup->applyDataUpdates()
#4 /home/mysite/beta.mysite.com/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Resource_Setup::applyAllDataUpdates()
#5 /home/mysite/beta.mysite.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#6 /home/mysite/beta.mysite.com/index.php(87): Mage::run('', 'store')
#7 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}[/code]
Is there a way to "reset" the install?
Magento install error - Exception printing is disabled
Here is a known error which can occur when installing Magento:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXXXXXXX
Here is the solution:
1 Navigate to the "errors" folder.
2 Change local.xml.sample to local.xml
You should now see a new list of crazy errors all over the Magento page - this is okay.
3 Open magento/lib/Zend/Cache/Backend/File.php and look for:
protected $_options = array(
'cache_dir' => 'null',
Change it to:
protected $_options = array(
'cache_dir' => 'tmp/',
Save it.
4 Now the final step is to go create a tmp folder in the root Magento folder.
That's it.
After waiting a little bit it allowed me to restart the install process without changing anything
First, drop your database first.
Second, create new database for new magento installation.
Third, reinstall your magento.
The following error pointing to your database have duplicate entry in setup tables. When I started Magento, I always saw this error types.
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'AD' for key 'PRIMARY'";i:1;s:865:"#0 /home/mysite/beta.mysite.com/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
PS. If allow to go admin panel, clear cache first. Then, try it again.
Hope help
I am currently using Magento version 1.7.0.2_2. While installing it's showing following errors:
Exception printing is disabled by default for security reasons.
Error log record number: 1970080033
Error in file says:
a:5:{i:0;s:206:"Error in file:
"D:\websites\magento\app\code\core\Mage\SalesRule\sql\salesrule_setup\upgrade-1.6.0.0-1.6.0.1.php" - SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'period'"
;i:1;s:930:"
#0 D:\websites\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 D:\websites\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.0.0', '1.6.0.3')
#2 D:\websites\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.0', '1.6.0.3')
#3 D:\websites\magento\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 D:\websites\magento\app\code\core\Mage\Core\Model\App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 D:\websites\magento\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#6 D:\websites\magento\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#7 D:\websites\magento\index.php(87): Mage::run('', 'store')
#8 {main}"
;s:3:"url";s:9:"/magento/";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:7:"default";}
p.s.: however each time it shows a different error record number
You can enable printing errors by renaming file local.xml.sample to local.xml. file location magentoRootDirectory/errors/
Magento install error - Exception printing is disabled
Here is a known error which can occur when installing Magento:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXXXXXXX
Here is the solution:
Navigate to the "errors" folder.
Change local.xml.sample to local.xml
You should now see a new list of crazy errors all over the Magento page - this is okay.
Open magento/lib/Zend/Cache/Backend/File.php and look for:
protected $_options = array(
'cache_dir' => 'null',
Change it to:
protected $_options = array(
'cache_dir' => 'tmp/',
Save it.
Now the final step is to go create a tmp folder in the root Magento folder.
That's it.
i have cleared the magento cache, and it solved the problem ( i mean, in "var" folder, there are "cache" and "sessions", and i have deleted everything in those two folders. but at first backup of course).
Googled for about 5 secs:
http://blog.magestore.com/2012/07/13/magento-blog-how-to-fix-the-error-%E2%80%9Cinvalid-default-value-for-period%E2%80%9D/
SQL Error While Installing Magento 1.7.0.2 Without Sample Data
In my case, I changed the php execution time in php.ini file to 64000.
I've migrated a Joomla site to a new server, updated the configuration.php file, and I'm getting these errors:
Fatal error: Uncaught exception 'RuntimeException' with message 'Less Parse Error: parse error: unclosed block' in
/var/www/websites/alwaysevolving/libraries/gantry/core/gantry.class.php:1141 Stack trace: #0
/var/www/websites/alwaysevolving/templates/rt_cerulean/features/styledeclaration.php(45): Gantry->addLess('mediaqueries.le...') #1
/var/www/websites/alwaysevolving/libraries/gantry/core/gantry.class.php(415): GantryFeatureStyleDeclaration->init() #2
/var/www/websites/alwaysevolving/libraries/gantry/gantry.php(289): Gantry->initTemplate() #3
/var/www/websites/alwaysevolving/libraries/gantry/gantry.php(439): gantry_template_initialize() #4
/var/www/websites/alwaysevolving/templates/rt_cerulean/lib/gantry/gantry.php(21): include('/var/www/websit...') #5
/var/www/websites/alwaysevolving/templates/rt_cerulean/index.php(15): require_once('/var/www/websit...') #6
/var/www/websites/alwaysevolving/libraries/joomla/document/html/html.php(531): require('/var/www/websit...') #7
/var/www/websites/alwaysevolving/libraries/joomla/do in /var/www/websites/alwaysevolving/libraries/gantry/core/gantry.class.php on line 1141
It looks like there's a problem parsing one of the less files, but:
I can't tell which one of the less files has the issue
The less files were fine on the other server
The site seems fine, so it seems like something in this template doesn't like my new server.
Thoughts??
Thanks!
The error message is a stack trace, but looking at it, it appears that the Gantry framework parsing the less file called mediaqueries.less.
I strongly believe that you have forgetten to close braces }. make sure to check the line number will help you resolve the issue.