You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Madden <jm...@ivytech.edu> on 2003/08/15 00:08:04 UTC
[users@httpd] how to force users to a 503 (apache 2)
Sure, it may sounds odd, but I'd actually like to start dropping clients a
whole lot sooner and I can't figure out how.
Due to a CGI process that talks to our mainframe which is causing some
serious performance issues there, I'd like to throttle back clients at,
say, 25 connections.
I've been playing with MaxClients, Min/MaxSpareServers,
MaxRequestsPerChild, and ListenBacklog for hours to no avail -- the server
appears to simply queue up the requests and eventually serve them rather
than forwarding the user to a 503 page. The error about exceeding
MaxClients appears in the ErrorLog but the server never appears to
actually do anything about it.
Note: I've been doing my testing on 1.3.26 but the production server is
actually 2.0.something (yeah, we lack in the testing department, and this
production server is our only 2.0.x box). I would expect the behavior of
these config directives to be the same between 1.3 and 2.0, but perhaps
I'm mistaken.
I know about mod_throttle, but it appears to have not yet been ported to
2.0.x. Would any other modules suffice? Has anyone run into this before
and managed to solve it?
Thanks,
John
--
John Madden
UNIX Systems Engineer
Ivy Tech State College
jmadden@ivytech.edu
---------------------------------------------------------------------
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
Re: [users@httpd] how to force users to a 503 (apache 2)
Posted by victor <vi...@outblaze.com>.
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
Re: [users@httpd] how to force users to a 503 (apache 2)
Posted by John Madden <jm...@ivytech.edu>.
> 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.
> 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.
> Btw, have you turned off keep alive in apache?
Yeah, forgot to mention that I guess.
Thanks,
John
--
John Madden
UNIX Systems Engineer
Ivy Tech State College
jmadden@ivytech.edu
---------------------------------------------------------------------
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
Re: [users@httpd] how to force users to a 503 (apache 2)
Posted by victor <vi...@outblaze.com>.
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.
But note, this way end user will run into a timeout error not 503
service unavailable.
Btw, have you turned off keep alive in apache?
Tor.
John Madden wrote:
>Sure, it may sounds odd, but I'd actually like to start dropping clients a
>whole lot sooner and I can't figure out how.
>
>Due to a CGI process that talks to our mainframe which is causing some
>serious performance issues there, I'd like to throttle back clients at,
>say, 25 connections.
>
>I've been playing with MaxClients, Min/MaxSpareServers,
>MaxRequestsPerChild, and ListenBacklog for hours to no avail -- the server
>appears to simply queue up the requests and eventually serve them rather
>than forwarding the user to a 503 page. The error about exceeding
>MaxClients appears in the ErrorLog but the server never appears to
>actually do anything about it.
>
>Note: I've been doing my testing on 1.3.26 but the production server is
>actually 2.0.something (yeah, we lack in the testing department, and this
>production server is our only 2.0.x box). I would expect the behavior of
>these config directives to be the same between 1.3 and 2.0, but perhaps
>I'm mistaken.
>
>I know about mod_throttle, but it appears to have not yet been ported to
>2.0.x. Would any other modules suffice? Has anyone run into this before
>and managed to solve it?
>
>Thanks,
> John
>
>
>
>
>
>
>
>
--
<!---------------------------------------------
Victor
Development Engineer
Outblaze Ltd
---------------------------------------------->
---------------------------------------------------------------------
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