Magento – 502 bad gateway nginx server

databaseerrorhhvmmagento-1server-setup

I am getting randomly the 502 bad gateway on my site. When I check the hhvm logs I am getting this error:

Fatal error: Class undefined: Mage_Facebookfree_Helper_Active in /mypath/Mage.php on line 547

The Belvg/Facebookfree module is disabled from admin panel and from modules/Belvg_Facebookfree.xml

<active>false</active>

Also I commented all of the code when the helper is called from the design folder. What should I try more ? and why I am getting this error randomly ? thx

UPDATE
After I removed the line from core_config_data I got again 502 and in the logs i got this message:

SlowTimer [1308ms] at runtime/ext_mysql: slow query: SELECT COUNT(*) AS `count` FROM `mydb`.`catalog_product_entity_datetime` WHERE (CONVERT(`value_id` USING utf8) LIKE '%advanced/modules_disable_output%' OR CONVERT(`entity_type_id` USING utf8) LIKE '%advanced/modules_disable_output%' OR CONVERT(`attribute_id` USING utf8) LIKE '%advanced/modules_disable_output%' OR CONVERT(`store_id` USING utf8) LIKE '%advanced/modules_disable_output%' OR CONVERT(`entity_id` USING utf8) LIKE '%advanced/modules_disable_output%' OR CONVERT(`value` USING utf8) LIKE '%advanced/modules_disable_output%')

this is one of the many tables. There is multiple slow timer errors

Best Answer

Please try:

  1. Clean all HHVM compilation cache (i don't know how it works exactly but as far as I know hhvm magic is based on compilation)

  2. If still happens, look for any layout xml(specially local.xml on your theme)/*.phtml/config.xml/attribute using that helper.

  3. if you can, remove the entry with path: advanced/modules_disable_output/[that_module] on core_config_data table.

If problem persist turn developer_mode ON or look at the exception.log to find the complete error stack.