Website Loading Issue Fixed

Daven Hiskey December 15, 2011 0
Whew, sorry about that.  The intermittent page loading problem the last couple days has been solved now (for real this time) ;-).   My apologies for not getting more new articles up the last day or two, I’ve been working on this pretty constantly and didn’t have a chance to put any new ones up other than in the brief respite in between when the problem seemed to go away and when it started again.  Everything’s back to normal now and new stuff will be on the way tomorrow (Thursday-15th).

For those interested in what was going wrong and how it was fixed: the bug was affecting only page loads on the posts themselves where it would sometimes only load the page half way or not at all, but other times load just fine.  It should also be noted at this point that this problem was affecting many of my websites, but not all, across two different servers.  My first inclination (because I hadn’t changed anything code-wise; my servers weren’t having any apparent issues, nor was the network they were on; also it was only on the post pages themselves and not any others; and it was such a widespread problem) was that it was an external script, like some ad or some other script that only exists on the post pages and would be common on all the sites, because I use the same ad companies on all of them, and many similar such scripts.  If an ad was the problem, this would also only load some of the time, which could perhaps explain the intermittent thing.

So the first thing I did was remove all the external scripts (or so I thought).  This did not fix it, so I then spent many hours investigating potential network problems, potential IIS (web server) problems, MySQL (database) problems, including sifting through all the many logs, etc.  I came up with nothing.  I even tried transferring Today I Found Out to a different host instead of my own servers, which you may have noticed resulted in the site really going down very briefly yesterday.  Nothing worked.

So, while this is my field of expertise, at this point I was really stumped and was considering bringing in outside help.  However, after taking a break I came back and realized there was one log file I had forgotten to check, due to its very large size (2.5 GB) and had meant to sift through it after I had checked the other logs, but had forgotten.  After opening it up, the problem presented itself surprisingly quickly (almost immediately, actually), example of the problem:  [15-Dec-2011 06:20:37] PHP Fatal error:  Cannot use object of type stdClass as array in C:\Websites\TodayIFoundOut\wp-content\plugins\digg-digg\include\dd-class.php on line 1205

So, what does that mean?  Non-technically, it means my first guess as to what was wrong the other day was absolutely correct.  Why I didn’t remove that one item (the digg-digg plugin) when I removed all the other scripts that access external code was that Today I Found Out doesn’t use that plugin anymore and hasn’t since the update on the look of Today I Found Out a month or so ago, so I had forgotten about it.  But, unbeknownst to me, the plugin was still active, even though set to not display.   I disabled the plugin completely and voila, fixed.  So, because of my own forgetfulness a problem that could have been solved in a few minutes, being my first guess at what was wrong, took a couple days.  It’s always something.  :-)

That still doesn’t beat my personal record though.  I was once writing device driver software for a custom device in my Master’s program in Computer Science and had a simple typo that cost me around 100 hours, in which I literally spent the entire time in the lab, taking breaks only to grab food and use the bathroom (I slept in the lab a couple hours here and a couple hours there as I could).  I only solved that one about an hour or so before the assignment was due (after working on it three weeks total, around five or six days of which was fixing the bug).  My professor and everyone else I had look at it could find nothing wrong with the device driver code, but it always froze the operating system as soon as it loaded, giving no indication as to why.  About an hour before the assignment was due a friend of mine glanced at my code for all of 15 seconds and said “oh, you have idh instead of ibh there” (those were two variables used in the program).  I’ll spare you the technical details of why that would cause the whole operating system to freeze in this case, given my code, but needless to say, that still holds the record for me of “stupid mistake that cost me many hours of pointless exertion”.  Happily, in that case, because I had gone through all my code line by line hundreds of times (though never noticing the typo), once that bug was fixed, everything else worked perfectly, which usually doesn’t happen given the amount of untested code there was and particularly in code as complex as that particular driver was.  But, it worked out, in the end.

In any event, sorry for the inconvenience and the lack of new content today.  New stuff will be up tomorrow sometime.

Enjoy this article? If so, get our FREE wildly popular Daily Knowledge and Weekly Wrap newsletters:

Subscribe Me To:  | 
Print Friendly
Check Out Our New Book and "Nerdy Stuff" TIFO Shop! »

Leave A Response »