Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. App unresponsive due to error

App unresponsive due to error

Scheduled Pinned Locked Moved Solved WordPress (Developer)
11 Posts 5 Posters 1.4k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • imc67I Offline
      imc67I Offline
      imc67
      translator
      wrote on last edited by
      #1

      One of my WP Dev apps is “crashing” regularly and this is the error message:

      server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
      

      How can I increase this setting?

      nebulonN 1 Reply Last reply
      0
      • imc67I imc67 marked this topic as a question on
      • P Offline
        P Offline
        privsec
        wrote on last edited by
        #2

        It may be due to a hacking attempt

        https://support.plesk.com/hc/en-us/articles/115002643313-WordPress-site-hosted-in-Plesk-is-slow-Lots-of-log-entries-POST-xmlrpc-php-HTTP-1-0-499

        imc67I 1 Reply Last reply
        0
        • P privsec

          It may be due to a hacking attempt

          https://support.plesk.com/hc/en-us/articles/115002643313-WordPress-site-hosted-in-Plesk-is-slow-Lots-of-log-entries-POST-xmlrpc-php-HTTP-1-0-499

          imc67I Offline
          imc67I Offline
          imc67
          translator
          wrote on last edited by
          #3

          @privsec thanks for finding however the xmlrpc on my sites are always locked for security reasons.

          However, after searching around the internet and this forum I combined some answers and tried the following:

          In the filemanager there is a folder /apache/ and it contains a file mpm_prefork.conf.

          There I changed the (very low values) to:

          
          StartServers	10
          
          MinSpareServers	10
          
          MaxSpareServers 40
          
          MaxRequestWorkers	  256
          
          MaxConnectionsPerChild   1000
          
          
          

          Let’s wait and see if this solves the issue.

          P girishG 2 Replies Last reply
          0
          • imc67I imc67

            @privsec thanks for finding however the xmlrpc on my sites are always locked for security reasons.

            However, after searching around the internet and this forum I combined some answers and tried the following:

            In the filemanager there is a folder /apache/ and it contains a file mpm_prefork.conf.

            There I changed the (very low values) to:

            
            StartServers	10
            
            MinSpareServers	10
            
            MaxSpareServers 40
            
            MaxRequestWorkers	  256
            
            MaxConnectionsPerChild   1000
            
            
            

            Let’s wait and see if this solves the issue.

            P Offline
            P Offline
            privsec
            wrote on last edited by
            #4

            @imc67 how much daily traffic do you get?

            1 Reply Last reply
            0
            • imc67I imc67

              One of my WP Dev apps is “crashing” regularly and this is the error message:

              server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
              

              How can I increase this setting?

              nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #5

              @imc67 do you have any plugin installed which may use websockets? Those are long-lived, so each websocket connection will use one request worker.

              imc67I 1 Reply Last reply
              0
              • imc67I imc67

                @privsec thanks for finding however the xmlrpc on my sites are always locked for security reasons.

                However, after searching around the internet and this forum I combined some answers and tried the following:

                In the filemanager there is a folder /apache/ and it contains a file mpm_prefork.conf.

                There I changed the (very low values) to:

                
                StartServers	10
                
                MinSpareServers	10
                
                MaxSpareServers 40
                
                MaxRequestWorkers	  256
                
                MaxConnectionsPerChild   1000
                
                
                

                Let’s wait and see if this solves the issue.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @imc67 said in App unresponsive due to error:

                mpm_prefork.conf

                Indeed, fixing the values in that file is the correct fix.

                imc67I 1 Reply Last reply
                1
                • nebulonN nebulon

                  @imc67 do you have any plugin installed which may use websockets? Those are long-lived, so each websocket connection will use one request worker.

                  imc67I Offline
                  imc67I Offline
                  imc67
                  translator
                  wrote on last edited by
                  #7

                  @nebulon said in App unresponsive due to error:

                  do you have any plugin installed which may use websockets

                  I checked the inspector but couldn't find any

                  1 Reply Last reply
                  0
                  • girishG girish

                    @imc67 said in App unresponsive due to error:

                    mpm_prefork.conf

                    Indeed, fixing the values in that file is the correct fix.

                    imc67I Offline
                    imc67I Offline
                    imc67
                    translator
                    wrote on last edited by
                    #8

                    @girish said in App unresponsive due to error:

                    Indeed, fixing the values in that file is the correct fix.

                    The changed values result finally in a more stable situation.

                    This is not a high traffic site (5k month) and the only one created with Avada Theme and that's really a "monster".

                    1 Reply Last reply
                    1
                    • imc67I imc67 has marked this topic as solved on
                    • d19dotcaD Offline
                      d19dotcaD Offline
                      d19dotca
                      wrote on last edited by
                      #9

                      I didn't notice any unresponsiveness but combing through WP logs for a different issue for a Shop Manager user, I noticed a few instances of the same error reported in this thread. It's a large WooCommerce site being built and they're making a lot of product changes so this is what I suspect the root cause of that is in my case at least.

                      So it's safe to increase that then eh? Any guidance on increasing that in terms of how it may affect Cloudron at all?

                      @imc67 - what did you increase yours to out of curiosity?

                      --
                      Dustin Dauncey
                      www.d19.ca

                      imc67I 1 Reply Last reply
                      1
                      • d19dotcaD d19dotca

                        I didn't notice any unresponsiveness but combing through WP logs for a different issue for a Shop Manager user, I noticed a few instances of the same error reported in this thread. It's a large WooCommerce site being built and they're making a lot of product changes so this is what I suspect the root cause of that is in my case at least.

                        So it's safe to increase that then eh? Any guidance on increasing that in terms of how it may affect Cloudron at all?

                        @imc67 - what did you increase yours to out of curiosity?

                        imc67I Offline
                        imc67I Offline
                        imc67
                        translator
                        wrote on last edited by
                        #10

                        @d19dotca said in App unresponsive due to error:

                        @imc67 - what did you increase yours to out of curiosity?

                        This my current config, it's 99% more stable than before:

                        <IfModule mpm_prefork_module>
                            # On startup, start these many servers
                        	StartServers	10
                        
                            # At any given time, keep atleast these many servers
                        	MinSpareServers	10
                        
                            # At any given time, keep atmost these many idle servers (this is always >= MinSpareServers+1)
                        	MaxSpareServers 40
                        
                            # Maximum number of servers at any given instant. Requests will be queued after this
                        	MaxRequestWorkers	  256
                        
                            # Recycle process after handling these many requests. This protected against accidental memory leaks
                        	MaxConnectionsPerChild   1000
                        </IfModule>
                        
                        1 Reply Last reply
                        2
                        • d19dotcaD Offline
                          d19dotcaD Offline
                          d19dotca
                          wrote on last edited by d19dotca
                          #11

                          Perfect! I ran some tests today with tweaking various numbers and looked at recommendations online too. It's mostly a copy of yours @imc67 in the end but with a lower MaxConnectionsPerChild. Ran a bunch of different tests with different numbers but concluded that was the best bang for the buck so-to-speak given the 4 GB memory max set on each WP app.

                          It's a mix of default values from the Ubuntu install and the default Apache values in the original package too (for the 256 MaxRequestWorkers for example). I'm pleased with the results. 🙂

                          Here's what I have for reference now, and I used ab (Apache Benchmark) to run some performance tests and had significant improvements over the defaults. Thought I'd share the testing results in case anyone was interested.

                          New mpm_prefork.conf I'm using:

                          # Restart the app if you make changes to this file
                          
                          <IfModule mpm_prefork_module>
                              # On startup, start these many servers
                          	StartServers 5
                          
                              # At any given time, keep atleast these many servers
                          	MinSpareServers	5
                          
                              # At any given time, keep atmost these many idle servers (this is always >= MinSpareServers+1)
                          	MaxSpareServers 10
                          
                              # Maximum number of servers at any given instant. Requests will be queued after this
                          	MaxRequestWorkers 256
                          
                              # Recycle process after handling these many requests. This protected against accidental memory leaks
                          	MaxConnectionsPerChild 500
                          </IfModule>
                          

                          Resources:

                          • https://httpd.apache.org/docs/2.4/mod/prefork.html
                          • https://exampleconfig.com/view/apache-ubuntu20-04-etc-apache2-mods-available-mpm_prefork-conf
                          • https://www.woktron.com/secure/knowledgebase/133/How-to-optimize-Apache-performance.html
                          • https://www.maketecheasier.com/optimizing-apache-part-1/

                          Results from ab with default settings that come with Cloudron's WP package: (note the rather large spread between min and max request times)

                          Concurrency Level:      50
                          Time taken for tests:   12.391 seconds
                          Complete requests:      1000
                          Failed requests:        0
                          Total transferred:      84813000 bytes
                          HTML transferred:       84205000 bytes
                          Requests per second:    80.70 [#/sec] (mean)
                          Time per request:       619.574 [ms] (mean)
                          Time per request:       12.391 [ms] (mean, across all concurrent requests)
                          Transfer rate:          6684.04 [Kbytes/sec] received
                          
                          Connection Times (ms)
                                        min  mean[+/-sd] median   max
                          Connect:      227  291  36.4    287     401
                          Processing:   220  281 122.2    252    1039
                          Waiting:      144  190 120.0    161     954
                          Total:        451  572 127.3    546    1285
                          
                          Percentage of the requests served within a certain time (ms)
                            50%    546
                            66%    570
                            75%    584
                            80%    594
                            90%    624
                            95%    818
                            98%   1091
                            99%   1261
                           100%   1285 (longest request)
                          

                          Results after tweaking to the above new configuration: (note that the max request time here is about 60% faster still than original config results and overall a much more consistent behaviour too!)

                          Concurrency Level:      50
                          Time taken for tests:   11.358 seconds
                          Complete requests:      1000
                          Failed requests:        0
                          Total transferred:      84813000 bytes
                          HTML transferred:       84205000 bytes
                          Requests per second:    88.04 [#/sec] (mean)
                          Time per request:       567.899 [ms] (mean)
                          Time per request:       11.358 [ms] (mean, across all concurrent requests)
                          Transfer rate:          7292.24 [Kbytes/sec] received
                          
                          Connection Times (ms)
                                        min  mean[+/-sd] median   max
                          Connect:      230  287  26.9    283     389
                          Processing:   220  252  17.3    249     329
                          Waiting:      144  160  10.0    157     217
                          Total:        467  539  33.0    538     649
                          
                          Percentage of the requests served within a certain time (ms)
                            50%    538
                            66%    550
                            75%    559
                            80%    567
                            90%    584
                            95%    599
                            98%    618
                            99%    622
                           100%    649 (longest request)
                          

                          --
                          Dustin Dauncey
                          www.d19.ca

                          1 Reply Last reply
                          4
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Bookmarks
                            • Search