My client requires the server connection to be persistent for long durations to support old software. I have tried changing the Apache2 KeepAliveTimeout
to 0, 5, 30, 100 for testing, but the connection is always closed at ~20seconds. This is how the tshark capture for a session looks like: Tshark capture of HTTPS session .
My /etc/apache/apache2.conf
settings:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 1100
I can see that these changes are reflected in Response Headers
: Response Headers snap . I also checked the TCP keepalive config files:
# cat /proc/sys/net/ipv4/tcp_keepalive_time
7200
# cat /proc/sys/net/ipv4/tcp_keepalive_intvl
5
# cat /proc/sys/net/ipv4/tcp_keepalive_probes
9
I, now, have no idea why the connection is getting closed with SSL close_notify
at ~20 seconds everytime. Can anyone please share some leads for me to check on, to identify what is causing this behavior and possibly fix it.Please let me know if any further info is required. Thankyou
My environment details:
OS: Ubuntu 20.04.4 LTS
Apache2 server version: Apache/2.4.41 (Ubuntu)
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020