No announcement yet.

How to enable http2

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Nope, it only works with MPM being set to "worker".

    So it might be worth for IW to look into this, i.e. why the default configs are differing from the standard....


    • #17

      Http/2 and the Event MPM being enabled automatically was only for new installations, which is where I think the confusion between your servers lies. It sounds like John's is a newer install, but Micheal's is not. The info on the module showing in the GUI is also something that was for newer installations, as well. Exposing the info on the Webserver page, and using Event and http/2 by default was put into place in 6.1.1, which was around the beginning of March of this year. So servers older than that would not look the same. It was done this way so as to not potentially cause any issues with the existing servers, as changing the mpm automatically away from prefork could have caused some problems.

      We built in support for http/2 in 6.0.9, but I believe at that point, it was still something that needed to be enabled in the conf. I thought we had public documentation on how to do that, but I can not, for the life of me, find it now. I'll put something together as a reference so as to potentially get around this confusion in the future. :)

      So basically, there are a couple differences in what is considered the default, depending on when InterWorx was installed.

      Sorry for the confusion! Glad everything was able to be resolved! :)


      • #18
        Hi Jenna,

        thanks for the explanation, that makes sense. And now I know to use Event MPM.

        There's one thing though, when I switched from worker to event MPM, some values in the web server options have been cleared. Is this by deisgn, i.e because they have to be set again or to other

        John, could you list your values (like "Server limit", Threads per Child" and so on)?

        Any recommendations for suitable settings for a VPS with 8 Xeon (Sandy Bridge) cores @2,1Ghz? And for an even beefier Skylake Xeon machine with 8 or 16 dedicated (exclusive) cores and NVMe?

        I usually don't touch the defaults unless I have to, but now that they are gone, I will use that as an excuse to fiddle a little :)


        • #19
          Oh, and these 8 core machines have 32GB RAM, the 16 core 64GB, almost forgot. I know that I should consider the average memory usage of apache processes, but right now these machines are mostly idling, so I will have to guess a little bit...


          • #20
            Hi Michael

            Many thanks, yes will do but if I am thinking correctly, I think 1 of your option boxes will be blank and not allow an entry to be made.

            If this is correct, please could you open a support ticket with IW for correction. IW will correct and the values will appear normally.

            The new version allows more control so it is a little more complicated ie if you edit a siteworx account, you will see you have greater control over mpm to limit or allow more resources

            I suppose the reality is given the cores/memory it may come down to site usage alone, which you can control to a degree but please do not forget you may have ssd v3/4 as well, so thatís added to the mix

            Itís all good fun though and I think needs thinking out side of box. Our new server has 24 cores and 50gb of ram with full ssd, setup using 3 independent volumes and an independent swap. Itís a beast and benchmarking shows excellent on defaults alone

            Many thanks



            • #21
              Hi John,

              yes, it seems there is some bug or I am doing something wrong. Changing over to Event MPM, I cannot save my web server options settings and there is an error saying "maxclient input is required". But maxclients (now Max Request Workers) should be calculated automatically, but it isn't.

              Here's what I came up with:

              Server Limit 128
              Threads Per Child 16
              Max Request Workers (should be 2048)
              Start Servers 4
              Min Spare Threads 1024
              Max Spare Threads 2048
              Max Requests per Child 0
              Timeout 60
              Keepalive on
              Keepalive Requests (max) 500
              Keepalive Timeout 2


              • #22
                I might have fixed it myself by simply adding this to http.conf

                # event MPM
                # StartServers: initial number of server processes to start
                # MaxRequestWorkers: maximum number of simultaneous client connections
                # MinSpareThreads: minimum number of worker threads which are kept spare
                # MaxSpareThreads: maximum number of worker threads which are kept spare
                # ThreadsPerChild: constant number of worker threads in each server process
                # MaxConnectionsPerChild: maximum number of requests a server process serves
                <IfModule event.c>
                ServerLimit 128
                StartServers 4
                MaxRequestWorkers 2048
                MinSpareThreads 1024
                MaxSpareThreads 2048
                ThreadsPerChild 16
                MaxConnectionsPerChild 0

                I will report back, if IW tells me differently


                • #23
                  With regards to determining the best/correct values for Apache, I found this article to be the best of the bunch that I've read so far:


                  • #24
                    Just as an update, Jenna informed me that these are the default values (just in case anybody is also missing the entry and wants to stay on the safe side):

                    # event MPM
                    <IfModule event.c>
                    ServerLimit 20
                    ThreadsPerChild 25
                    MaxRequestWorkers 500
                    StartServers 3
                    MinSpareThreads 75
                    MaxSpareThreads 250
                    ThreadLimit 32
                    MaxConnectionsPerChild 8192
                    MaxKeepAliveRequests 100
                    KeepAliveTimeout 5


                    • #25
                      I currently have my site hosted in Azure, as a Web App. So far Http/2 support is none. As I used to check on what HTTP protocol my server is using. My concern is how can I future proof my app development so when Http/2 comes, I can start embracing it immediately? Will it be possible to provide a fallback to Http/1.1? What other considerations should I take into for better handling the future?


                      • #26
                        Hi harryjosh

                        Again what IW-CP distro and server type are you using

                        Http2 is centos 7 running apache 2.4

                        If your server is running that distro, it should be already http2 ready/running and no vhost config needed

                        Actually if you login to nodeworx, system services, web server - down the right hand side it should show http2 running (green)

                        Centos 6 and lower runs apache 2.2 and is not capable of http2

                        Many thanks