View Single Post
  #1  
Old November 21, 2010, 03:20:17 PM
Cat333Pokémon's Avatar
Cat333Pokémon Cat333Pokémon is offline
Administrator

 
Join Date: Nov 2006
Location: Nevada
Posts: 10,303
Default A massive flaw fixed...and a hopefully faster server

As you may or may not have noticed, VR has been having all sorts of errors over the past month. The chat has been kicking people off repeatedly due to dropped connections. Pages wouldn't load without reason.

Well, I finally found the cause. If you ever peeked at the VictoryBattles board, you may have noticed that there have always been at least ten people looking at it at any given time. Well, here's what happened:

When we closed down the Floatzel Pokédoptables, I created a very simple redirect script that sent all traffic over to the Floatzel Migration thread. It literally sent every single request to a file in that folder to the thread...including all of the embedded adoptables. People typically had 5 adoptables in their signatures on other forums. On popular threads, said people could get in a little posting exchange and there could easily be 20-30 adoptables in a single page. If it's a commonly-viewed page on that forum, notably the first page of a news thread, it could get hit hundreds of times. Even though it only loads the HTML document and none of the images, that is a lot of views. Every time it loads, the server has to put together the PHP scripting for the migration thread. (Well, caching might make it do that less.)

The thread is 256 KB (262,733 bytes) right now, and it has averaged that for some time...
A given page loads 20-30 adoptables at a time...
That page gets hundreds of hits...
All for a little bad-image X in someone's signature.

As of now, the thread has 1,121,538 views, which you can see here. Every one of those views was 256 KB or less. Accounting for people who didn't let all of them load, that's 250 GB of bandwidth and well over a million times the server had to put the page together and quite a few million MySQL queries.

Thank you, FreezeWarp, for fixing up the .htaccess script to properly redirect all the image calls. Instead of that massive thead code, this small (840 bytes) image I whipped up is called:

Last edited by Cat333Pokémon; November 21, 2010 at 03:26:24 PM.