Forum Moderators: phranque

Message Too Old, No Replies

throttling back the server

unwanted 503s

         

lucy24

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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 ::

Brett_Tabke

2:02 pm on Jul 11, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



(while fixing the 'old post' error), I ran into this one and got curious Lucy...

Did you ever figure this out?

lucy24

3:53 pm on Jul 11, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Did you ever figure this out?
Heh. I saw the subject header, wondered what it was about--while knowing I would have no idea how to answer--and was more than a little surprised to find it was my question from way back :)

:: detour to raw logs ::

Huh. Whatever was causing the problem seems to have fixed itself around January 2018. I suppose there was some kind of server tweak at the time.

Brett_Tabke

4:10 pm on Jul 11, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Ok good. 503 errors are pretty nasty when they happen. They usually point to a solution pretty quickly by surfing the logs.