4 ms·
Cheap/misconfigured hosting will cripple any CMS.
by jemka 14y ago
Cheap/misconfigured hosting will cripple any CMS.
- jrockway 14y agoThe error is always "error opening database connection". You should not open any database connection to send back a static block of HTML.
- 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.
- lucb1e 14y agoMy website uses PHP and a persistent MySQL connection, one for each parallel request. This held up perfectly when a post of mine came on the HN homepage (server is an Asus EEE PC with a low-end Intel Atom). This makes me think the problem is not in connecting to a database, it's in Wordpress somehow. A static page with comments would probably not work any better for high traffic websites, sooner or later there'll be an access violation: cache update while someone was loading the page.