How to render 500 Error Handling template in Drupal 8 when MySQL is down

Created on 15 October 2019, about 5 years ago
Updated 13 April 2023, over 1 year ago

When there is a fatal error because of MySQL server is down , it outputs a response with the message "The website encountered an unexpected error. Please try again later."

I tried to handle this exception with "maintenance offline page" (maintenance-page--offline.html) template in D8 , also tried to find solution in .htaccess but no luck!

I want to handle this with an event subscriber which will capture the HTTP 500 response and redirect it to static error-500.html page.

Anyone had success with either of these approaches?

💬 Support request
Status

Closed: outdated

Version

9.3

Component
Database 

Last updated about 1 hour ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

🇮🇳India deepsthedrupaler

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.

Production build 0.71.5 2024