If a web application relies on a database to serve dynamic content and that content is unavailable for whatever reason (database server down, etc.), what is the preferred method for handling this scenario?
- Redirect the visitor to a custom 404 page?
- Display the page anyway but include some sort of error message where the content would otherwise be?
- Display a related page that has static content?
- Other?
I understand that proper error logging should occur as well as notifying the webmaster and/or sysadmin. I'm mostly interested in best practices for what the end user should see in this situation.