httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From victor <vic...@outblaze.com>
Subject Re: [users@httpd] how to force users to a 503 (apache 2)
Date Mon, 18 Aug 2003 06:12:14 GMT
John Madden wrote:

>>I don't think you can do that with apache. the only way I can think of
>>is to setup squid in front of apache and use the read_time_out option
>>there to terminate the connection between apache and squid after certain
>> seconds.
>>    
>>
>
>Any chance that setting Timeout to something low could provide the same
>effect?  I'm guessing that the CGI process will continue to run even after
>the client is disconnected or forwarded to an error page, so that may not
>be sufficient anyway.
>

  I'm afraid not, the timeout option in apache is sort of refer to read 
time out, it doesn't timout a running apache process.   Check out the 
RLimitCPU option, if your CGI take forever to load because it takes too 
much cpu that option might help you.

>>But note, this way end user will run into a timeout error not 503
>>service unavailable.
>>    
>>
>
>I'm not so concerned with which error is thrown as long as we can set an
>ErrorDocument for it to display a "please try again in 30 seconds" sort of
>message.
>
  actually you won't be able to return any message if you terminate your 
process such way, the browser will return the 'connection reset by peer' 
error and stop.

  really, it is already too late to to try to tell client your server is 
too busy please go away after your CGI script already start serving the 
request.  You will have to do it way ahead, check out the vhost_limit 
module, that might be able to help you.

  http://www.nowhere-land.org/programs/mod_vhost_limit/

Tor.


Tor.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message