Score:0

Apache stops responding after a while when activating HTTP/2

dz flag

I have apache 2.4.41 on Ubuntu 20.04 and run a certain application through PHP-FPM, with the MPM set to 'event'. Recently, in an attempt to speed up the application, I enabled HTTP/2 in the virtualhost by adding Protocols h2 http/1.1. Of course I first checked if the HTTP2 module was enabled using apachectl -M. I checked the response from the server: HTTP/2 is working. Apache2 accepts the protocol handshake and the application is noticeably faster.

Now after a few days (or sometimes hours) of use, the application stops responding to requests. When I check htop, I don't see high CPU processes or memory usage. Checking the status of apache, php-fpm and mariadb processes doesn't reveal any error either.

I removed the h2 parameter from the Protocols directive and reloaded apache, which solves it. But of course I would like to use HTTP/2. Does anyone have any idea what could be causing this? Which logs I could check to get a clue, or which tests I could perform?

vidarlo avatar
ar flag
What does your logs show?
Guido Goluke avatar
dz flag
I assume you are referring to the error log for that specific virtual host. There is nothing in there.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.