News for hackers. Stuff that matters.
Re:Why is my TI-99/4A in Black and White? by jemka on Friday March 29, 2013 @01:31PM (#5461848)
Cheap/misconfigured hosting will cripple any CMS.
Re:Why is my TI-99/4A in Black and White? by jrockway on Friday March 29, 2013 @06:07PM (#5463294)
The error is always "error opening database connection". You should not open any database connection to send back a static block of HTML.
Re:Why is my TI-99/4A in Black and White? by jemka on Friday March 29, 2013 @07:10PM (#5463513)
>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?

Re:Why is my TI-99/4A in Black and White? by jrockway on Friday March 29, 2013 @08:31PM (#5463814)
I 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.
Re:Why is my TI-99/4A in Black and White? by jemka on Friday March 29, 2013 @10:44PM (#5464145)
This 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.

Re:Why is my TI-99/4A in Black and White? by lucb1e on Friday March 29, 2013 @07:34PM (#5463610)
My 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.