cancel
Showing results for 
Search instead for 
Did you mean: 

With much traffic: website goes blank

SOLVED

With much traffic: website goes blank

Hello everyone,

 

Ever since we've patched the store (all available patches for magento 1.8.0.0) we're having cache problems (I think).

 

When there's a lot of traffic (mostly because someone tries to get into the system and fails), the website goes blank, and the following message is seen on the backend:

Fatal error: Call to a member function getBlockName() on a non-object in /app/code/core/Mage/Captcha/Block/Captcha.php on line 43

 

And when I look into the reports it shows this:

 

Front controller reached 100 router match iterations

 

 

And I get a loooot of 503 errors inside the visitors log

When I empty the var directory the site works again. So it must be a cache error.. right?

 

I've checked the permissions on /var: everything is set to 755

 

The hosting company has patched the site with SUPEE 4755, but still the problem remains.

 

How can I find out what's the culprit and what to do?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: With much traffic: website goes blank

Hi @The Tankgirl

 

The issue seems to be happening because of two different reasons.

 

 1) Following error

 Fatal error: Call to a member function getBlockName() on a non-object in /app/code/core/Mage/Captcha/Block/Captcha.php on line 43

is coming from the mentioned file in error and the code under this file is as following 

 

 protected function _toHtml()
    {
        $blockPath = Mage::helper('captcha')->getCaptcha($this->getFormId())->getBlockName();  /*Line 43*/
        $block = $this->getLayout()->createBlock($blockPath);
        $block->setData($this->getData());
        return $block->toHtml();
    }

So you should try to debug in this file.

 

 

2) front controller reached 100 router match iterations

The problem occurs because your routers are making circular references for dispatching requests.

 

Please refer following link How to fix “front controller reached 100 router match iterations” and try to debug the issue.

 

Update:

 

Disable the captcha and observe for few hours.

1) For testing  give 0777 permission to the var folder and check.

2) Follow this link for the proper file permissions Setting Privileges and Ownership After You Install Magento

3) See this url also http://stackoverflow.com/q/25857237/1616003

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

View solution in original post

3 REPLIES 3

Re: With much traffic: website goes blank

Hi @The Tankgirl

 

The issue seems to be happening because of two different reasons.

 

 1) Following error

 Fatal error: Call to a member function getBlockName() on a non-object in /app/code/core/Mage/Captcha/Block/Captcha.php on line 43

is coming from the mentioned file in error and the code under this file is as following 

 

 protected function _toHtml()
    {
        $blockPath = Mage::helper('captcha')->getCaptcha($this->getFormId())->getBlockName();  /*Line 43*/
        $block = $this->getLayout()->createBlock($blockPath);
        $block->setData($this->getData());
        return $block->toHtml();
    }

So you should try to debug in this file.

 

 

2) front controller reached 100 router match iterations

The problem occurs because your routers are making circular references for dispatching requests.

 

Please refer following link How to fix “front controller reached 100 router match iterations” and try to debug the issue.

 

Update:

 

Disable the captcha and observe for few hours.

1) For testing  give 0777 permission to the var folder and check.

2) Follow this link for the proper file permissions Setting Privileges and Ownership After You Install Magento

3) See this url also http://stackoverflow.com/q/25857237/1616003

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: With much traffic: website goes blank

I think it was the Mage_Captcha part, and I've turned it off (I use other extensions for contact forms anyway). The permissions were correct, so that wasn't the problem.

No problems with the store now.. *fingers crossed*

 

I've used this to deactivate Mage_Captcha, without messing with the core files

http://magento.stackexchange.com/questions/78596/how-to-disable-the-default-captcha-packaged-with-ma...

This way I only have to remove zzz_deactivate.xml if turning off the captcha gives problems.

Re: With much traffic: website goes blank

Unfortunately yesterday the site went down again.

The logs show this:

                      - - [24/Jan/2016:10:36:38 +0100] "HEAD /skin/README_FOR_DECRYPT.txt HTTP/1.1" 404 - "-" "-"
                      - - [24/Jan/2016:10:36:39 +0100] "HEAD /skin/error.php HTTP/1.1" 404 - "-" "-"
                      - - [24/Jan/2016:10:36:39 +0100] "HEAD /media/custom.php HTTP/1.1" 404 - "-" "-"
                       - - [24/Jan/2016:10:36:39 +0100] "HEAD /media/import.php HTTP/1.1" 404 - "-" "-"
                       - - [24/Jan/2016:10:36:40 +0100] "HEAD /skin/custom.php HTTP/1.1" 404 - "-" "-"

I've removed the IP address
Permissions on the cache folder have been checked.

Any more suggestions?
I also found this:
https://www.c3media.co.uk/blog/c3-news/security-fix-might-take-site/
I'm going to test this and report back

The idea is to add:

if (function_exists('libxml_disable_entity_loader')) {
    libxml_disable_entity_loader(false);
}

inside index.php