Comecei a servir arquivos Brotli pré-compactados em meu site https://www.filmfix.com/en/home/ . Eles trabalham; mas desde então, o Apache está tendo problemas de resposta em todas as configurações do VirtualHost (não apenas para os VirtualHost
dedicados a servir esses arquivos HTML estáticos pré-compactados).
Se eu clicar logo após o carregamento inicial (muito lento), ele geralmente permanece responsivo (ou se eu apenas reiniciei o Apache) - mas se eu esperar um pouco, ele para de responder. E pode levar de 7 a 45 segundos para reconectar. Ocasionalmente, o navegador expirava, aguardando a conexão.
O que poderia estar causando isso; e como faço para corrigir isso?
Meus resultados https://www.webpagetest.org são assim.
Espero que não esteja relacionado à minha pergunta de há pouco tempo: Internal Network drops connection .
Encontrei uma pergunta semelhante em stackoverflow.com que me deu mais algumas ideias, mas nada resolveu.
Ou poderia ser culpa minha? Estou processando lotes de 18 chamadas assíncronas de três nomes de domínio diferentes, gerando páginas HTML que são minimizadas, pré-compactadas e enviadas para outros servidores. A CPU gira em torno de 80% com isso. Será que estou sobrecarregando o Apache? Estamos lidando com cerca de 5.000 páginas.
Do meu arquivo httpd-default.conf
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>
Estes são os diferentes sintomas do navegador que observo:
Conexão inicial/SSL do Chrome Timing
... e o que li quando a conexão está interrompida:
(sem informações)
Cachoeira Microsoft Edge
... e o que li quando a conexão está interrompida:
Estabelecendo conexão segura...
Tempos do FireFox bloqueados
... e o que li quando a conexão está interrompida:
Executando handshake TLS com (meu nome de subdomínio estático)
ou
Transferindo dados de connect.facebook.net
E descobri que às vezes o tempo de bloqueio é quase tão longo quanto o tempo de configuração do TLS:
Minha configuração
Servidor: Apache/2.4.39 (Win64) OpenSSL/1.1.1c PHP/8.1.10, tenho 48 GB de RAM disponíveis e a CPU é um i7-8700 a 3,20 GHz.
Meu DNS TTL está definido para 3 horas, pois estou prestes a realocar arquivos em servidores diferentes.
Meu arquivo httpd-ssl.conf
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>
Tentei configurar <VirtualHost *:443>
para <VirtualHost 0.0.0.0:443>
(estou usando apenas IPv4), mas não ajudou.
Desliguei meu Firewall para ver se é relacionado ao Firewall, não é.
executando isso
openssl s_client -connect www.filmfix.com:443 -status -servername www.filmfix.com
retorna isso
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
qualquer ajuda seria muito bem vinda.
Obrigado.
Eu estou mantendo meus dedos cruzados.
I updated Apache -- going from 2.4.39 to 2.4.57.
In order to do that I had to first make sure Visual C++ Redistributable is updated:
Running the update I did a repair, followed by updating Apache.
The website looks and acts a bit different using the same Apache configuration files as before, and hopefully my initial connection speed issue resolved itself.
I also added default index files
And if all ends up to work well the update allows me to consider using HTTP/3. ChatGTP suggest:
Download Required Software:
Download and Build libnghttp2:
Download and Build Apache with HTTP/3 Support:
srclib
directory within the extracted Apache source directory.quiche
directory toquic
:Configure and Enable mod_http3:
modules
directory within the Apache source directory.mod_http3
module file (mod_http3.so
) to your Apache modules directory.httpd.conf
) in a text editor.Start Apache with HTTP/3 Support:
httpd.exe
from thebin
directory of the built Apache.