Drupal 7.x is crashing the server by httpd requests - caching

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/

Related

Fatal error: Uncaught Error: Call to undefined function wp_unregister_GLOBALS() when upgrading to 5.5

I have WordPress running on Windows 10 with IIS.
While upgrading WordPress to 5.5 this morning I received the following error:
PHP Fatal error: Uncaught Error: Call to undefined function wp_unregister_GLOBALS() in C:\inetpub\wwwroot\wordpress\wp-settings.php:70 Stack trace: #0 C:\inetpub\wwwroot\wordpress\wp-config.php(92): require_once() #1 C:\inetpub\wwwroot\wordpress\wp-load.php(37): require_once('C:\inetpub\wwwr...') #2 C:\inetpub\wwwroot\wordpress\wp-admin\admin.php(34): require_once('C:\inetpub\wwwr...') #3 C:\inetpub\wwwroot\wordpress\wp-admin\index.php(10): require_once('C:\inetpub\wwwr...') #4 {main} thrown in C:\inetpub\wwwroot\wordpress\wp-settings.php on line 70
This was a very easy fix. Since my installation was local I just copied all the files and directories located in the WordPress 5.5 upgrade folder (in my case it was C:\inetpub\wwwroot\wordpress\wp-content\upgrade\wordpress-5.5-no-content-cIBdh3\wordpress) to the root of the site (in my case C:\inetpub\wwwroot\wordpress) overwriting the file already there.
Very simple fix. I guess the installation hit something while it was copying or timedout, who knows. I'm sure you can do the same thing by FTPing to your site if you are hosting your site remotely.
i am updating to 5.5 in my hostiing and i got this problem, the solution is You should upload all and folder file update except wp-content but it depends

instance of ParseError given in /var/www/html/myanants/lib/Cake/Error/ErrorHandler.php

After I did first upload cakephp project to server ,this fetal error occurrs.
Fatal Error
Error: Uncaught TypeError: Argument 1 passed to
ErrorHandler::handleException() must be an instance of Exception,
instance of ParseError given in
/var/www/html/myanants/lib/Cake/Error/ErrorHandler.php:116 Stack
trace: #0 [internal function]:
ErrorHandler::handleException(Object(ParseError)) #1 {main} thrown
File: /var/www/html/myanants/lib/Cake/Error/ErrorHandler.php Line:
116
Notice: If you want to customize this error message, create
app/View/Errors/fatal_error.ctp
You are running a non-PHP7 compatible CakePHP 2 version on a PHP7 system - that won't work. Upgrade your CakePHP dependency to at least CakePHP 2.8.x.
2.8 Migration Guide
CakePHP 2.8 is a fully API compatible upgrade from 2.7. This page
outlines the changes and improvements made in 2.8.
PHP7 Compatibility
CakePHP 2.8 is compatible with, and tested against PHP7.
[...]
https://book.cakephp.org/2.0/en/appendices/2-8-migration-guide.html

Error while hosting CodeIgniter Framework to online server

I need to solve the below issue:
When I tried to hosting codeIgniter framework to my online server, this error occurred.
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/lviscomp/public_html/system/core/Output.php:528)
Filename: core/Common.php
Line Number: 573
Backtrace:
A PHP Error was encountered
Severity: Error
Message: XCache: Cannot init
Filename: Unknown
Line Number: 0
Backtrace:
I had the same xcache issue in my Laravel application. I resolved it by upgrading the PHP version.
I think this might help you as well.
Go to your cPanel
Go to software section and click "select PHP version"
Change your PHP version from "native" to 5.4 or 5.5 (It will give you a list of drivers with checkboxes)
Select Xcache and enable it
Save your settings as well as PHP version
I hope it will work.
For Above Error header information already sent...
Click here!
XCache: Cannot init
Try Disable XCACHE from the Php configuration..
if this doesn't work ..
I think this is a question for your host.

503 Service Temporarily Unavailable on Magento after Clearing Cache

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.

Cron job error outputting failed loading of ioncube loader

I recently moved from php 4 to 5. I had my server people look and ioncube loader is installed properly. I'm at a loss of what this is and what to actually do. I have magento 1.9 so I have the cron job set up every minute to output the sales emails (like I read in other places)
Thanks for your help.
Failed loading /usr/local/IonCube/ioncube_loader_lin_5.4.so: /usr/local/IonCube/ioncube_loader_lin_5.4.so: undefined symbol: execute
Zend Guard Loader requires Zend Engine API version 220100525.
The Zend Engine API version 220121212 which is installed, is newer.
Contact Zend Technologies at http://www.zend.com/ for a later version of Zend Guard Loader.
X-Powered-By: PHP/5.5.21
Content-type: text/html
<b>Fatal error</b>: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but the extension is not loaded' in /home/xxx/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php:342
Stack trace:
#0 /home/xxx/public_html/lib/Zend/Db/Adapter/Abstract.php(248): Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2)
#1 /home/xxx/public_html/app/code/core/Mage/Core/Model/Resource.php(175): Zend_Db_Adapter_Abstract->__construct(Array)
#2 /home/xxx/public_html/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#3 /home/xxx/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#4 /home/xxxy/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#5 /home/xxx/public_html/app/code/core/Mage/Core/ in <b>/home/xxx/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php</b> on line <b>342</b><br />
You installed the ionCube Loaders for PHP 5.4 (as indicated by the filename), yet you have PHP 5.5 installed (X-Powered-By: PHP/5.5.21).
You can download the appropriate ionCube Loaders from here, or use the Loader Wizard available here (zip, tgz) to help with the installation; in any case you'll have to remove the zend_extension = <path to the outdated loaders/> line from your php.ini and restart your PHP/Apache process to remove the outdated Loader extension.

Resources