ADVERTISEMENT
Advertise Here

Huckleberries Online

Ryan Explains Fix To HBO Slowness

Blogmeister Ryan: (For the truly nerdy out there, what I found this morning was two queries that took 18 seconds each to execute - this function was being triggered every 2 minutes to fill out the “recent comments” list in the sidebar box and the “latest comments” thread. The new code collapses that function into one 94ms query. Heh.) Once the change is in place, we’ll need to run a quick update script to re-save all existing comments. While that’s running, you may notice a few quirks in comment counts and the “recent comments” lists, but then everything should be good to go. Full post below.

CindyH: I like it when Ryan talks nerdy :-)


OK, I believe we should have a fix. I’ll need to wait until morning to apply it, as it’s a nontrivial change to our code, and you don’t do that when the server admin is out of cell phone contact for the next 3 hours ;)

For now, I’ll leave the “Latest Comments” box in the sidebar disabled, as that should keep the regular blog and blogpost pages from triggering the problem. This wasn’t a traffic-related issue at all, it was an inefficient database query.

(For the truly nerdy out there, what I found this morning was two queries that took 18 seconds each to execute - this function was being triggered every 2 minutes to fill out the “recent comments” list in the sidebar box and the “latest comments” thread. The new code collapses that function into one 94ms query. Heh.)

Once the change is in place, we’ll need to run a quick update script to re-save all existing comments. While that’s running, you may notice a few quirks in comment counts and the “recent comments” lists, but then everything should be good to go.

10 comments on this post so far. Add yours!
  • toadman on May 13 at 8:52 a.m.

    Ryan: What database does the software use? What blog software is this we’re running on? Is this running on a stand alone server or on a cluster, and what OS is being used to serve the web front end? Does the database reside on another machine from the web front end, or is it self contained? Will this change be universal across all SR blogs, or specific only to this one?

    Just some questions…

    ;-)

  • spokelooneh on May 13 at 9:19 a.m.

    Seems better so far, although I don’t often click on latest comments, but the main page hasn’t timed out yet, nor any of the comment threads that I’ve opened.

  • spokelooneh on May 13 at 9:22 a.m.

    Just tried Latest Comments. Timed out. Just FYI, I know Ryan’s working on it.

  • Cabbage Boy on May 13 at 9:34 a.m.

    I’ll follow up Toad’s comments,

    what is your username and password? Have you applied all the updates? If not, which ones have you skipped?

    :)

  • toadman on May 13 at 10:03 a.m.

    Cabbage: HA!

    I remember a guy who used to work in tech support who told me “we always start by telling end users to defrag their hard drive because it gives us time to go pee or get coffee or something.”

  • Cindy_H on May 13 at 10:06 a.m.

    Omigosh!
    Years ago, I had a techie tell me to defrag. I hung up on him.

  • spokelooneh on May 13 at 10:38 a.m.

    There’s an hilarious show on British TV, and lately here on IFC called “The IT Crowd”.

    Whenever a user calls for help, the first they say is “Have you turned it off and back on again?”

    “The U.K.’s popular, hysterically offbeat sitcom The IT Crowd, which focuses on the shenanigans of a trio technical support staff set in the underbelly of Reynholm Industries, a fictitious British corporation, will air for the first time in the U.S. on September 30 at 10:00 p.m. as part of IFC’s new Tuesday night AUTOMAT programming block. The BAFTA-nominated series, which is the brainchild of writer/director Graham Linehan (Father Ted, Black Books) and producer Ash Atalla (The Office), takes viewers into the dark, dingy, underground office space of the unappreciated, socially awkward IT department, far away from the shinny modern digs and spectacular views the rest of the company enjoys.”

    http://www.collectiondx.com/node/2865

    http://www.youtube.com/watch?v=gt9j80Jkc_A

  • Cabbage Boy on May 13 at 10:58 a.m.

    Toad, Defrag? how long did it take this guy to pee???

    Heck, I just ignore people and then they tell me “Oh, my problem went away.”

  • vitalyb on May 13 at 5:16 p.m.

    @toadman

    The database runs on its own dedicated server and we’re using PostgreSQL.

  • Escapee on May 13 at 11:52 p.m.

    Cindy, I can just envision you saying to Ryan, “You had me at ‘New Code”’…

« Back to Huckleberries Online

You must be logged in to post comments.
Please create a profile or log in here.


About this blog

D.F. Oliveria is a columnist and blogger for The Spokesman-Review. Huckleberries Online was judged the best 2008 Idaho newspaper blog by the Idaho Press Club. And the best 2007 news blog in the Pacific Northwest by the Society for Professional Journalist. Print Huckleberries is a past winner of the Herb Caen Memorial Column contest by the National Association of Newspaper Columnists. The Readership Institute of Northwestern University cited this blog as a good example of online community journalism.

Find DFO on Facebook

DFO on Twitter

Betsy Russell on Twitter

HBO newsmakers Twitter list

Take this week's news quiz ›
Search this blog
Subscribe to this blog
ADVERTISEMENT
Advertise Here