You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Yuri <yu...@rawbw.com> on 2014/12/30 01:16:46 UTC
[users@httpd] Apache breaks connections after requests
I have a question about the situation that happens with Apache with
Wikimedia app.
In short, Apache begins to break connections when there are many
concurrent requests.
(Here is the bug report that I created for wikipedia
https://phabricator.wikimedia.org/T85191).
Connections are broken after http request is complete, but 'Connection:
keep-alive' has been set by the server in the last response.
I view this a violation of RFC2616 because server breaks connection
without letting the client know.
My questions are:
What could be misconfigured in Apache? Or maybe this is considered
normal that it breaks connections?
Is there an option that Apache slows down clients without disconnecting
in case of congestion?
Yuri
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache breaks connections after requests
Posted by Yuri <yu...@rawbw.com>.
On 12/29/2014 17:19, Eric Covener wrote:
> >I have a question about the situation that happens with Apache with
> >Wikimedia app.
> >In short, Apache begins to break connections when there are many concurrent
> >requests.
> >(Here is the bug report that I created for wikipedia
> >https://phabricator.wikimedia.org/T85191).
> >Connections are broken after http request is complete, but 'Connection:
> >keep-alive' has been set by the server in the last response.
> >
> The event MPM does this as a specific process runs out of threads, in
> the hope that there are other processes in better shape. If it
> didn't, and the keepalive connections became ready, they would queue.
I run only 30 requests concurrently, and every ~15-25 sec an event
occurs when many connections are dropped. 30 must be a drop in a bucket
for the powerful wikipedia server, which probably serves thousands of
requests concurrently.
So it is not clear why 30 concurrent users can cause it run out of
threads, and why connections are broken in bulk, many of them at the
same time. And why congestion is triggered later, after 15 seconds of
successful work (assuming the problem is congestion that triggers some
logic in apache server)?
Since 30 must be very little compared to how many requests it serves in
general, does this mean that it stops every 15 seconds and just sheds
connections randomly?
Yuri
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache breaks connections after requests
Posted by Eric Covener <co...@gmail.com>.
On Mon, Dec 29, 2014 at 7:16 PM, Yuri <yu...@rawbw.com> wrote:
> I have a question about the situation that happens with Apache with
> Wikimedia app.
> In short, Apache begins to break connections when there are many concurrent
> requests.
> (Here is the bug report that I created for wikipedia
> https://phabricator.wikimedia.org/T85191).
> Connections are broken after http request is complete, but 'Connection:
> keep-alive' has been set by the server in the last response.
>
The event MPM does this as a specific process runs out of threads, in
the hope that there are other processes in better shape. If it
didn't, and the keepalive connections became ready, they would queue.
> I view this a violation of RFC2616 because server breaks connection without
> letting the client know.
A client, server, or proxy MAY close the transport connection at any
time. For example, a client might have started to send a new request
at the same time that the server has decided to close the "idle"
connection. From the server's point of view, the connection is being
closed while it was idle, but from the client's point of view, a
request is in progress.
This means that clients, servers, and proxies MUST be able to recover
from asynchronous close events.
> My questions are:
> What could be misconfigured in Apache? Or maybe this is considered normal
> that it breaks connections?
Seems normal, albeit relatively new in event in 2.4?
> Is there an option that Apache slows down clients without disconnecting in
> case of congestion?
http://httpd.apache.org/docs/2.4/mod/event.html#asyncrequestworkerfactor
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org