[wp-trac] [WordPress Trac] #58344: Connect to database on first query
WordPress Trac
noreply at wordpress.org
Thu May 18 00:50:15 UTC 2023
#58344: Connect to database on first query
--------------------------+------------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version:
Severity: normal | Resolution:
Keywords: | Focuses: performance
--------------------------+------------------------------
Comment (by dd32):
One edge-case to consider is that currently WordPress will exit with a
`Site Unavailable` type error when the DB is unavailable, with this
potential change if the query isn't made until the Footer or mid-post-
render the page may partially render before hitting a `wp_die()` condition
(As you don't really want to return empty result-sets in the event of a
DB-down scenario).
However, plugins like HyperDB and others do delay the DB connect until a
query is made, so this might not be an actual issue that needs
consideration.
That being said, If a persistent object cache is not in play, delaying
until the first query will have very little change for most sites and
scenario's.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58344#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list