You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@community.apache.org by 刘畅 <fl...@gmail.com> on 2021/12/14 10:02:18 UTC

Apache actively close tcp connections when keep-alive is set by the client

Hi everybody,

I'm trying to do Apache performance benchmarking for my course project. But
I met a strange problem. When I use a single client to establish multiple
TCP connections (e.g. 100) to an Apache server and send HTTP 1.1 requests
with the *"Connection: keep-alive"* header, I suppose the TCP connections
can be reused. But the Apache server will actively terminate TCP
connections, even if *"Connection: Keep-Alive"* and *"Keep-Alive: xxx" *are
included in the HTTP response header. I paste my code and more details on a
stack overflow question:

https://stackoverflow.com/questions/70346241/apache-actively-close-tcp-connections-when-keep-alive-is-set-by-the-client

I'd be very grateful if someone can help me solve this problem or tell me
why Apache has such a behavior. Thank you!

Chang Liu

Tsinghua University

Re: Apache actively close tcp connections when keep-alive is set by the client

Posted by 刘畅 <fl...@gmail.com>.
Thanks a lot, I would do that :)

Xiangdong Huang <sa...@gmail.com> 于2021年12月14日周二 18:11写道:

> Hi Chang Liu,
>
> you may need to post your email to mail list to Apache Http server project
> [1].
>
> [1] https://httpd.apache.org/lists.html
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
> 刘畅 <fl...@gmail.com> 于2021年12月14日周二 18:02写道:
> >
> > Hi everybody,
> >
> > I'm trying to do Apache performance benchmarking for my course project.
> But
> > I met a strange problem. When I use a single client to establish multiple
> > TCP connections (e.g. 100) to an Apache server and send HTTP 1.1 requests
> > with the *"Connection: keep-alive"* header, I suppose the TCP connections
> > can be reused. But the Apache server will actively terminate TCP
> > connections, even if *"Connection: Keep-Alive"* and *"Keep-Alive: xxx"
> *are
> > included in the HTTP response header. I paste my code and more details
> on a
> > stack overflow question:
> >
> >
> https://stackoverflow.com/questions/70346241/apache-actively-close-tcp-connections-when-keep-alive-is-set-by-the-client
> >
> > I'd be very grateful if someone can help me solve this problem or tell me
> > why Apache has such a behavior. Thank you!
> >
> > Chang Liu
> >
> > Tsinghua University
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@community.apache.org
> For additional commands, e-mail: dev-help@community.apache.org
>
>

Re: Apache actively close tcp connections when keep-alive is set by the client

Posted by Xiangdong Huang <sa...@gmail.com>.
Hi Chang Liu,

you may need to post your email to mail list to Apache Http server project [1].

[1] https://httpd.apache.org/lists.html

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

刘畅 <fl...@gmail.com> 于2021年12月14日周二 18:02写道:
>
> Hi everybody,
>
> I'm trying to do Apache performance benchmarking for my course project. But
> I met a strange problem. When I use a single client to establish multiple
> TCP connections (e.g. 100) to an Apache server and send HTTP 1.1 requests
> with the *"Connection: keep-alive"* header, I suppose the TCP connections
> can be reused. But the Apache server will actively terminate TCP
> connections, even if *"Connection: Keep-Alive"* and *"Keep-Alive: xxx" *are
> included in the HTTP response header. I paste my code and more details on a
> stack overflow question:
>
> https://stackoverflow.com/questions/70346241/apache-actively-close-tcp-connections-when-keep-alive-is-set-by-the-client
>
> I'd be very grateful if someone can help me solve this problem or tell me
> why Apache has such a behavior. Thank you!
>
> Chang Liu
>
> Tsinghua University

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@community.apache.org
For additional commands, e-mail: dev-help@community.apache.org