We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17412
    • 270 Posts
    Hi. I’ve built my biggest site yet on Modx - currently 2000+ pages (will grow way beyond this).
    The site is hosted on a shared server which is responsive. The old version of the site is still live and with it’s 2000+ pages is very responsive (approx: 1 - 1 1/2 second per page load). However, the new modx site takes approx 5-6 seconds per page load.

    What factors might be at play here? and is there any way to boost the responsiveness?

    I did have caching turned off by default - this is now turned on (and has been for the past 2 weeks of development).

    Thanks for any pointers/help.
      • 37550 ☆ A M B ☆
      • 711 Posts
      Have you tried turning of MODx stats, and reverse DNS lookups we had this running on a fairly large site and found the site to be running slow.

      Aaron
        http://www.onesmarthost.co.uk
        UK MODX Hosting with love.
        • 17412
        • 270 Posts
        > Have you tried turning of MODx stats

        I don’t have this turned on. ( Log visits (stats) is off )

        > reverse DNS lookups

        I can’t see this option in the configuration panel. Where might I find that?


        To clarify I have modx 0.9.6 installed.

        Thanks.
          • 22303 MODX Staff
          • 10,725 Posts
          I can assure you it will be a plugin or snippet that is common to all the pages exhibiting the slowdown. Also, have you moved to keeping all plugins and snippets in external includes? This will help reduce the siteCache file size, which is likely quickly approaching 1Mb in size with 2000 documents + all the snippet and plugin source code.
            • 7231
            • 4,205 Posts
            Also, have you moved to keeping all plugins and snippets in external includes?
            Do you mean to instead of including the actual snippet code in modx you would actually have an include statement in the snippet window and the actual code in an external file? I guess this could be done with basically any snippet.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: dev_cw at Sep 19, 2007, 01:33 PM

              Also, have you moved to keeping all plugins and snippets in external includes?
              Do you mean to instead of including the actual snippet code in modx you would actually have an include statement in the snippet window and the actual code in an external file? I guess this could be done with basically any snippet.
              Correct; I do it this way so I can keep my snippet, plugin, and module code on the filesystem (I like to use SVN to control versioning, at least on my PHP code) and reduce the amount of code in the siteCache file. All it requires is something like the following in your snippet, plugin or module (php tags for code highlighting purposes only):
              <?php
              return include(MODX_BASE_PATH . 'assets/snippets/mysnippet/mysnippet.php');
              ?>

              You may or may not want to return the results from the actual include; but if your snippet returns content explicitly with a return statement, this will channel that output as the response from that snippet very easily.
                • 17412
                • 270 Posts
                Excellent - I will try this placing all snippet and plugin code in external files.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  As Jason said, be careful how you use that "return" statement. Depending on the function you are "return"-ing, it can return a 1, since the function that is being called itself returns a value to indicate success or failure. I think the include() function does that, so if you have "return include(myfile.php)" it will include the file, then display a 1, since the include() function was successful, which can be very annoying to try to get rid of.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 17412
                    • 270 Posts
                    I’ve tinkered around with this - removing snippets (not using that many anyway) - there are no plugins being used on the frontend.
                    The only common snippet is WayFinder and removing this doesn’t really speed things along.

                    Is there a better way to debug this?
                      • 17412
                      • 270 Posts
                      Things have gone from bad to worse since migrating 800 items from a temporary folder to the main Ditto-managed folder. Although the 2000+ items in this directory are spread out over 4 years of archives - I’m having real issues loading the Ditto news index.

                      It intermittently loads though more often that not I’m getting an error 500 - which I imagine is down to memory issues with the php process involved in loading up the Ditto items.

                      Reference links:
                      Main site: http://tinyurl.com/ywkck9
                      Section provoking error 500: http://tinyurl.com/29ewlg

                      I’m not getting very far with this :0
                      I’m very keen to get this fixed up asap so I’m considering the Commercial Support options, specifically: "Purchase an On Demand Support Incident Ticket" - would the support provided be enough to sort this situation out or only provide a series of recommendations?

                      Many thanks for all your help.