MPM event killing K-A connections too early

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MPM event killing K-A connections too early

Yann Ylavic
This was lately reported to me (privately) with the root cause being
r1819855 ([1], present in 2.4.x too) setting workers_were_busy=1 when
connections_above_limit() is reached.

Before r1819855, the #connections limit (based on
AsyncRequestWorkerFactor) only caused listening sockets to be
"paused", while now it also causes existing keepalive connections to
be early terminated (see [2]), while the docs for
AsyncRequestWorkerFactor state that it only happens when "all workers
are busy".

Since (I think) there is no point in killing connections before it's
really needed (workers exhausted), I'm about to restore the original
behaviour with the attached patch, WDYT?

Regards;
Yann.

[1] https://github.com/apache/httpd/commit/49b0ef1e914369678dd7001ad78f88fac4c1802a#diff-895d7e9f8add746606c82027dabc04d4R2031
[2] https://github.com/apache/httpd/blob/trunk/server/mpm/event/event.c#L2208

workers_were_busy.diff (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: MPM event killing K-A connections too early

Ruediger Pluem


On 9/18/20 4:04 PM, Yann Ylavic wrote:

> This was lately reported to me (privately) with the root cause being
> r1819855 ([1], present in 2.4.x too) setting workers_were_busy=1 when
> connections_above_limit() is reached.
>
> Before r1819855, the #connections limit (based on
> AsyncRequestWorkerFactor) only caused listening sockets to be
> "paused", while now it also causes existing keepalive connections to
> be early terminated (see [2]), while the docs for
> AsyncRequestWorkerFactor state that it only happens when "all workers
> are busy".
>
> Since (I think) there is no point in killing connections before it's
> really needed (workers exhausted), I'm about to restore the original
> behaviour with the attached patch, WDYT?
>

Sounds sensible.

Regards

RĂ¼diger