4 ms·
>The error is always "error opening database connection". You should not open any database connection to send back a static block of HTML. What? The message i
by jemka 14y ago
>The error is always "error opening database connection". You should not open any database connection to send back a static block of HTML.
What? The message indicates an error connecting to MySQL. WordPress (a CMS) uses MySQL to store its content. If it cannot fetch that content from the DB, you see an error. What were you expecting?
- jrockway 14y agoI was expecting the page to be cached in RAM. Assembling a page from a database for every request is wasteful of limited computing resources. And doesn't work, as the error message mentions.
- jemka 14y agoThis isn't a limitation of WordPress. It's a limitation in the stack. The average WordPress (or any other CMS for that matter) stack doesn't serve pages from RAM. And even if it did, it could expire, it could be updated, it could become corrupt, the caching server could go down, or have a number of other things go wrong. There would be a call to the DB, the DB could fail and there would STILL be a static html page returned providing information on the error.