Does not seem to work when database is down

Created on 5 April 2022, over 2 years ago
Updated 17 May 2023, over 1 year ago

Problem/Motivation

This module does not work for me when the database is down.

Steps to reproduce

Install the module with composer, set it up as in the README and test with natural errors or with error_page_test. Then test with on /error_page_test/fatal_error to check that fatal errors are handled properly.

Then stop the database and try to load any page.

Result:

Additional uncaught exception thrown while handling exception.
Original
PDOException: SQLSTATE[HY000] [2002] Connection refused in Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (line 79 of /sites/doorinsider/web/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php).

Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (Line: 176)
Drupal\Component\DependencyInjection\Container->get() (Line: 212)
Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters() (Line: 62)
Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (Line: 176)
Drupal\Component\DependencyInjection\Container->get() (Line: 549)
Drupal\Core\DrupalKernel->getCachedContainerDefinition() (Line: 894)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 472)
Drupal\Core\DrupalKernel->boot() (Line: 707)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Additional
Error: Class 'Drupal\error_page\ErrorPagePhpErrorLogger' not found in Drupal\error_page\ErrorPageErrorHandler::logError() (line 168 of /sites/doorinsider/web/modules/contrib/error_page/src/ErrorPageErrorHandler.php).

Drupal\error_page\ErrorPageErrorHandler::logError() (Line: 102)
Drupal\error_page\ErrorPageErrorHandler::handleException()

PS: using https://github.com/drupal-composer/drupal-project

Proposed resolution

As a first step, does someone confirm this?

💬 Support request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

🇫🇷France GuillaumeDuveau Toulouse

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia NicolasH

    Yes, can confirm as well. Pasting full output below:

    Additional uncaught exception thrown while handling exception.
    Original
    PDOException: SQLSTATE[HY000] [2002] Connection refused in Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (line 79 of /code/web/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php).
    
    Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (Line: 177)
    Drupal\Component\DependencyInjection\Container->get() (Line: 212)
    Drupal\Component\DependencyInjection\PhpArrayContainer->resolveServicesAndParameters() (Line: 62)
    Drupal\Component\DependencyInjection\PhpArrayContainer->createService() (Line: 177)
    Drupal\Component\DependencyInjection\Container->get() (Line: 565)
    Drupal\Core\DrupalKernel->getCachedContainerDefinition() (Line: 942)
    Drupal\Core\DrupalKernel->initializeContainer() (Line: 487)
    Drupal\Core\DrupalKernel->boot() (Line: 716)
    Drupal\Core\DrupalKernel->handle() (Line: 19)
    Additional
    Error: Class "Drupal\error_page\ErrorPagePhpErrorLogger" not found in Drupal\error_page\ErrorPageErrorHandler::logError() (line 179 of /code/web/modules/contrib/error_page/src/ErrorPageErrorHandler.php).
    
    Drupal\error_page\ErrorPageErrorHandler::logError() (Line: 102)
    Drupal\error_page\ErrorPageErrorHandler::handleException()
Production build 0.71.5 2024