Welcome to WebmasterWorld Guest from 3.93.75.242

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

throttling back the server

unwanted 503s

     
11:46 pm on May 4, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15936
votes: 889


phranque, you out there? I need someone who speaks Apache; I've got a problem Regular Expressions won't solve.

The issue is 503 errors. They don't seem to affect human users-- I assume the browser just keeps re-requesting the file until it succeeds-- but the situation can't possibly be doing the server any good.

In one directory, each html page has an unusual lot of associated media files (sounds and images). Total, 100-150 files that need to be fully loaded before anything can happen.
-- The sounds are in the HTML itself using the <audio> element with preload set to "auto". I've found by experiment that I have to use this setting, or else the sounds may not be available at the precise moment they're needed.
-- The images are loaded by a javascript file for use with a canvas; they have to be fully loaded before anything can start. There's a "Loading..." status bar so users know that things are happening behind the scenes, even if it takes a while. Now, I might be able to fiddle with the code, so only a few images are loaded at the outset and the rest come in installments. But I'm not sure it would be a big enough change to overcome all problems. And I've gone as far as I can go with sprites; what's left needs to be in separate files.

Error logs don't currently show 503 errors. (Shared hosting, so I can't change the LogLevel. Seems like the level used to be higher, though.) I have to assume the errors happen because there are too many requests, too fast. When it isn't a 503, I'll often notice a pair of 206s instead. Again not desirable: it means the server has to process multiple requests in order to hand over one file.

So... Is there anything I can say in htaccess that will tell the user-agent not to request supporting files quite so fast?

:: wandering off to look up current host's minimum price for a VPS ::