Apparently, my website can go down without warning. Attempting to any page in this situation results in a 500 error and a message about failing to establish a database connection.

I haven’t done anything to the site in a while. On July 1, Google’s search console noticed that something was wrong and I was notified about it on July 4. A server reboot fixed the issue.