2

I wonder if anyone out there can explain a few things for me as I am getting stuck.

I am looking after a site that has multiple domains talking to the same code serving up different content depending on the domain used.We moved the site over to http2 with a wildcard certificate for all the domains and all seems to be running well apart from a problem I just can't figure out.

My current http2 config in the VirtualHost for all the sites is below at Config 1

When the server has been running for a while (24 hours) there are a lot of keepalives that hang around even though Keepalives are off and the H2MaxWorkerIdleSeconds = 20.

I notice that all the processes that have a keepalive have no data under the Request column Server Status 1

At random times i also find a lot of "Gracefully finishing" processes which i kill manually with a script.

The practical upshot of this is that the sites will go slow and I have run out of processes.

Can anyone tell me why the rows that are set to keepalive have no request or Vhost and why I get stuck "Gracefully finishing" processes that do not die?

Config 1

ProtocolsHonorOrder On

Protocols h2 http/1.1

H2Direct on

SSLCompression Off

H2MaxSessionStreams 200

H2SessionExtraFiles 100

H2MaxWorkerIdleSeconds 20

H2MaxWorkers 200

H2MinWorkers 10

Server Status 1

Current Time: Wednesday, 13-Jul-2016 14:00:49 BST
Restart Time: Tuesday, 12-Jul-2016 18:29:46 BST
Parent Server Config. Generation: 4
Parent Server MPM Generation: 3
Server uptime: 19 hours 31 minutes 3 seconds
Server load: 0.49 0.52 0.50
Total accesses: 645863 - Total Traffic: 5.4 GB
CPU Usage: u406.79 s84.29 cu0 cs0 - .699% CPU load
9.19 requests/sec - 80.6 kB/second - 8.8 kB/request
132 requests currently being processed, 29 idle workers
RC_KWKWK_KK_KWKKK_KKKKWKKW.KKWK_KWKKWKKWKKWKKKK__K_KKWK_KKWKK_._
KKWKKK_K.W_KK.KKKKKKKKKK.K_KK_W.W.WKKKK_KKK_KW.K..KK_KKKK_KWKKKK
K.K__WK_KKK_KWK__KWKKKKK.__WK_K_KWKKRWKKKKKWK...................
................................................................
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"C" Closing connection, "L" Logging, "G" Gracefully finishing,
"I" Idle cleanup of worker, "." Open slot with no current process
Srv PID Acc M   CPU SS  Req Conn    Child   Slot    Client  VHost   Request
0-3 2290    0/50/3251   R   0.60    0   0   0.0 0.42    26.94   119.26.154.144  www.changeddomain.com:80    HEAD /webcams/lac HTTP/1.1
1-3 2292    1/80/3194   C   7.94    0   4172    84.9    0.69    29.33   180.76.15.8 www.changeddomain.com:443   /camper-portals HTTP/1.1
2-3 2200    0/61/4811   _   0.76    4   0   0.0 0.90    44.57   66.249.78.18    www.changeddomain.com:80    GET /robots.txt HTTP/1.1
3-3 2294    45/74/851   K   2.96    22  270 15.9    0.07    5.31    194.203.40.135      
4-3 2296    1/102/4297  W   5.10    204 7945    0.0 0.86    38.15   82.132.237.7    www.changeddomain.com:443   GET /events/ HTTP/2
5-3 2298    19/38/4996  K   0.88    275 0   0.0 0.20    54.36   2a02:c7d:6a44:3e00:17:3a28:d22c     
6-3 2300    12/98/4308  W   1.19    124 0   0.0 0.33    39.88   164.39.215.246  www.changeddomain.com:443   GET /images/some-logo.png HTTP/2
7-3 2797    12/40/4700  K   0.38    83  147 0.0 0.31    47.94   217.41.3.50     
8-3 2304    0/86/4820   _   1.82    2   489 0.0 0.68    45.34   5.65.46.171 www.changeddomain.com:443   POST /_ajax_request.php HTTP/1.1
9-3 2307    17/73/4692  K   1.89    52  0   0.0 0.46    40.90   79.154.86.34        
10-3    2799    2/32/2915   K   0.34    5   0   0.0 0.56    25.22   88.131.48.4     
11-3    2311    0/70/4038   _   0.95    0   0   0.0 0.61    37.22   192.243.55.136  www.changeddomain.com:80    /events/videos/video-june HTTP/1.1
12-3    2313    19/76/5080  K   1.11    192 0   0.0 0.51    55.49   90.147.34.234       
13-3    2315    9/129/3168  W   2.33    30  155 1.5 0.50    32.61   86.146.7.124    www.somechangeddomain.com:443   POST /_ajax_request.php HTTP/2
stambata
  • 1,668
  • 3
  • 14
  • 18
Tom A
  • 21
  • 3

2 Answers2

0

Which version of apache and mod_http2 are you using? There were a lot of issues with this sort of thing initially (e.g. https://github.com/icing/mod_h2/issues/72)

Suggest you upgrade to latest version (note this requires Apache 2.4.23): https://github.com/icing/mod_h2/releases.

HTTP/2 support in Apache is still marked as experimental https://httpd.apache.org/docs/2.4/mod/mod_http2.html:

Warning

This module is experimental. Its behaviors, directives, and defaults are subject to more change from release to release relative to other standard modules. Users are encouraged to consult the "CHANGES" file for potential updates.

And there were a lot of changes and stability fixes initially. However recently the rate of change has slowed down and personally I find it's stable now but only running it on a small site for now.

Barry Pollard
  • 4,591
  • 15
  • 26
0

Thanks very much, simply upgrading seems to have done the trick. I feel a bit embarrassed not having done so sooner.

Thanks

Tom

Tom A
  • 21
  • 3