I am facing a problem in Magento It stops running and creates a "maintenance.flag" file. When i delete "maintenance.flag", the site is working again.

In log file it is showing the below error:

exception log:

ERR (3): exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in lib/Varien/Db/Statement/Pdo/Mysql.php:82
ERR (3): exception 'Mage_Core_Exception' with message 'Parent directory does not exist: catalog' in app/Mage.php:563

System log:

ERR (3): Strict Notice: Only variables should be passed by reference  in app/design/frontend/default/themename/template/page/1column.phtml on line 47
ERR (3): Deprecated functionality: Function split() is deprecated  in app/design/frontend/default/themename/template/catalog/layer/filter.phtml on line 40

How can I fix this issue.

Please help!

  • check mysql server logs for the error. Commented May 11, 2016 at 8:42
  • Thanks. It is showing error like this [access_compat:error] [pid 1468] [client ip:49763] AH01797: client denied by server configuration: app/etc/local.xml
    – Neeraj
    Commented May 11, 2016 at 9:24

1 Answer 1


Regarding the exception "MySQl has gone away"

This is mostly due to any of the below two reasons

  1. Server timed out and closed the connection.
    fix: try increasing the wait_timeout variable in your mysqld’s my.cnf/my.ini configuration file.
  2. Server dropped an incorrect or too large packet.
    fix : increase the maximal packet size limit by increasing the value of max_allowed_packet in my.cnf/my.ini file.

Please check in files if you are trying to get something that is taking too long or inapplicable.

Regarding parent directory exception

Paste the exception backtrace in the question.

  • But on same server other magento site working fine. So i think this is not server issue.
    – Neeraj
    Commented May 11, 2016 at 11:41
  • May be some query on one website is taking too long. Commented May 11, 2016 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.