Author Topic: Trying to catch an error  (Read 4684 times)

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4862
  • Have you played my board game?
    • Rival Troops
Trying to catch an error
« on: June 10, 2009, 10:53:20 »
For quite a while now the home page on Dragons Hobbies has used a bit of code that checks for updates in the forum on a cycle rather than pulling data from the database every time the page loads. This generally reduces load time for visitors to the home page and saves the database server from being over worked when there is no new data.

The past few days or so we have been noticing a strange glitch on the home page which has been causing the page to reload over and over. The times that I've noticed it I've just forced the home page to update and the problem was gone. Since the problem came on without any changes on my part I had hoped that the problem was just intermittent issues on the server. Unfortunately, this has continued so today when the problem came up again I captured some code from the problematic page.

Hopefully the check that I've put in place this morning will keep the page running smoothly. If you notice the home page loading over and over again, please send me a PM or add a comment here. If you notice other problems, please let me know about those too. (If you could copy and paste in any error messages or warnings, those are helpful to me also.)

Thank you!
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)

TylerChuit

  • Platinum Level
  • *****
  • Posts: 1105
  • I'm game!
    • My Game Collection via BGG
Re: Trying to catch an error
« Reply #1 on: June 10, 2009, 11:44:32 »
I'm not sure what you mean by "forcing an update" but I hit the refresh button, and the problem remains on my computer here at work. ???

I have noticed that when the problem happens, the recent forum posts don't show up.  From what miniscule amount I know about html code, that usually means the problem is somewhere right at the begining of that bit of business.  Perhaps a misplaced bracket or colon or whatnot.
« Last Edit: June 10, 2009, 11:51:07 by TylerChuit »
"One, two, three, four... I declare a global thermo-nuclear war!"

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4862
  • Have you played my board game?
    • Rival Troops
Re: Trying to catch an error
« Reply #2 on: June 10, 2009, 16:15:41 »
Did it happen again, or is this a comment about how it happened to you before?

In this case, forcing an update is not the same as refreshing the page. The page itself had an error that would last at least 15 minutes on it's own, so unless you refreshed the page right at that 15 minute mark it would still show up.

Without going into a lot of detail, there are separate sections that have their own expiration times, some are every 15 minutes, some every 3 hours, etc. When I force an update I make the program think that every section of the page has reached it's time limit.

What I found was that one section of the page, when it went out for updates, would occasionally run into a blank page. What I believe was happening was that an error was occurring on the server causing the forum to fail during loading, causing the program to spit out a page that needed to be refreshed, but since this page was not being read by another program rather than being viewed by a person looking at a web browser, the page didn't refresh right away and instead was captured and stored into the other files that get read as portions of the home page.

Ok. I guess I did get into a bit of extra detail, but anyway, I hope this doesn't show up anymore, but if it does, please let me know.
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)

Wyldwing

  • Platinum Level
  • *****
  • Posts: 1509
  • My new do!
    • Widget Bookkeeping and Tax, P.A.
Re: Trying to catch an error
« Reply #3 on: June 11, 2009, 05:49:23 »
I did notice it in the past, prior to your BLOG about it.  Thought it was just a glitch...

It seems fine now!!

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4862
  • Have you played my board game?
    • Rival Troops
Re: Trying to catch an error
« Reply #4 on: June 16, 2009, 08:37:34 »
I noticed this morning that I've managed to top the infinite loop of the page automatically reloading every second, but it also completely killed off the rest of the page from loading. I've made some more modifications which should display all everything other than the section that couldn't be updated.
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)