大网数据广告活动
服务器运维问答

Apache HTTP/2 connections are not persistent

· 52CE 我爱测

So I decided to implement HTTP/2 through Apache mod_http2. It was working fine, however every request, except for those with under 1 sec between them , is non-persistent. I am sure of this because as per the browser's network too…

问题原文

原帖链接 · Ivan · CC BY-SA 3.0

So I decided to implement HTTP/2 through Apache mod_http2. It was working fine, however every request, except for those with under 1 sec between them, is non-persistent. I am sure of this because as per the browser's network tools, the SSL connection is reinitialized every time:

Whereas, accessing the same page over HTTP/1.1 honors the server's keep-alive setting of 25 seconds and keeps the connection persistent:

Software running on the server:

Server Version: Apache/2.4.33 (cPanel) OpenSSL/1.0.2o mod_bwlimited/1.4
Server MPM: event
PHP version: PHP 7.0.29 (cli)
PHP handler: PHP-FPM

So question is, why does HTTP/2 initiate a new SSL connection on each subsequent request? From what I read, the whole point of it should be of using persistent connections, whereas it does not. Or am I missing something here?

Any pointers would be appreciated. Thank you.

已采纳解答

原帖链接 · Barry Pollard · CC BY-SA 4.0

This looks to be a bug to me and started in mod_http2 1.10.16 (released with Apache 2.4.30 - though a few issues with this meant it wasn't actually released until 2.4.33). Prior to that version it worked as you expected.

Have raised it with the mod_http2 author: https://github.com/icing/mod_h2/issues/160

This was quickly fixed, and was subsequently included in the next Apache release (2.4.34 released on 16th July 2018).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-04-27)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。