I started serving pre-compressed Brotli files on my website https://www.filmfix.com/en/home/. They work; but ever since then, Apache is having response issues along all VirtualHost setups (not just for the VirtualHost
dedicated to serving these pre-compressed static HTML files.)
If I click around right after the initial (very slow) loading, it usually remains responsive (or if I just restarted Apache) -- but if I wait a bit, it stops being responsive. And may take from 7 seconds to 45 seconds to reconnect. On occasion it would even time out the browser, waiting to connect.
What could be causing this; and how do I fix it?
My https://www.webpagetest.org results look like this.
I do hope it is not related to my question from not too long ago: Internal Network drops connection.
I found a similar question on stackoverflow.com which gave me some more ideas, but nothing fixed it.
Or could it be of my own doing? I am processing batches of 18 asynchronous calls from three different domain names, generating HTML pages that get minimized and pre-compressed and pushed out to other servers. The CPU hovers around 80% at that. Could it be that I am overloading Apache? We are dealing with about 5,000 pages.
From my httpd-default.conf file
Timeout 300
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 40
# reqtimeout module is disabled
#<IfModule reqtimeout_module>
# RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
#</IfModule>
These are the different browser symptoms I observe:
Chrome Timing Initial Connection/SSL
... and what I read when the connection is hanging:
(no information)
Microsoft Edge Waterfall
... and what I read when the connection is hanging:
Establishing secure connection ...
FireFox Timings Blocked
... and what I read when the connection is hanging:
Performing TLS handshake with (my static. sub domain name)
or
Transferring data from connect.facebook.net
And I found that sometimes the Blocked time is just about as long as the TLS Setup time:
My Setup
Server: Apache/2.4.39 (Win64) OpenSSL/1.1.1c PHP/8.1.10, I do have 48GB of RAM available and the CPU is a i7-8700 @ 3.20GHz.
My DNS TTL is set to 3 hours, as I am about to re-locate files to different servers.
My httpd-ssl.conf file
SSLSessionCacheTimeout 300
SSLUseStapling Off
HostnameLookups Off
EnableSendfile Off
EnableMMAP Off
<VirtualHost *:443>
Protocols h2 h2c http/1.1
...
SSLEngine on
...
SSLHonorCipherOrder on
SSLProtocol ALL -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:ECDH+AES256:DH+AES256:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
</VirtualHost>
I tried setting <VirtualHost *:443>
to <VirtualHost 0.0.0.0:443>
(I am using only IPv4), but that did not help.
I turned off my Firewall to see if it is Firewall related, it is not.
running this
openssl s_client -connect www.filmfix.com:443 -status -servername www.filmfix.com
returns this
CONNECTED(000001B8)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = *.my_domainname_dot_com
verify return:1
OCSP response: no response sent
---
Certificate chain
0 s:CN = *.my_domainname_dot_com
i:C = US, O = Let's Encrypt, CN = R3
1 s:C = US, O = Let's Encrypt, CN = R3
i:C = US, O = Internet Security Research Group, CN = ISRG Root X1
2 s:C = US, O = Internet Security Research Group, CN = ISRG Root X1
i:O = Digital Signature Trust Co., CN = DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
subject=CN = *.my_domainname_dot_com
issuer=C = US, O = Let's Encrypt, CN = R3
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 5026 bytes and written 406 bytes
Verification error: unable to get local issuer certificate
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 4096 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 20 (unable to get local issuer certificate)
---
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Session-ID: 3D6884662...
Session-ID-ctx:
Resumption PSK: 5EA6E2B7D...
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 300 (seconds)
TLS session ticket:
0000 ... 3i.
Start Time: 1691621025
Timeout : 7200 (sec)
Verify return code: 20 (unable to get local issuer certificate)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Session-ID: 9BFE3...
Session-ID-ctx:
Resumption PSK: 38FFBF004D...
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 300 (seconds)
TLS session ticket:
0000 - a9 01 cb ... a2 40 ....)..d...!.4.@
Start Time: 1691621025
Timeout : 7200 (sec)
Verify return code: 20 (unable to get local issuer certificate)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
httpd -D DUMP_RUN_CFG
C:\64bit\Apache24\bin>httpd -D DUMP_RUN_CFG
ServerRoot: "C:/64bit/Apache24"
Main DocumentRoot: "C:/64bit/htdocs"
Main ErrorLog: "E:/log-files/apache/error_.log"
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="C:/64bit/Apache24/logs/" mechanism=default
PidFile: "C:/64bit/Apache24/logs/httpd.pid"
Define: DUMP_RUN_CFG
Any help would be very much appreciated.
Thank you.