We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28563
    • 35 Posts
    Hi - I’ve developed a site for a large academic library <http://www.lib.usm.edu>, and the final implementation of our ModX site is very slow, especially under decent loads (40 to 100+ concurrent users). Pages take from 3 to 10 seconds to load, and under heavier loads, like a class instruction session, we’ve experienced 60 sec. + load times. I am unsure of what might be causing the issue; our server is very new, 4 xeon processors and lots of memory, scsi hardrives, etc.

    Additionally, we do nothing very complicated - no TVs, etc. I have these sort of generic templates that "wrap" the page content with with a header and a footer brought in as chunks, and page content in the middle. Dropmenu is used to create a menu of pages on the current level in all templates And we use the breadcrumbs snippet in all templates. Nothing very fancy, and the end result is very slow load time. In fact, the ModX site seems much faster. Other possible factors - we have a very large CSS stylesheet, and a lot of javascript functions in the head of each of our 4 main templates. But few of these are called at any given point in time, and it’s nothing excessive.

    any suggestions?
      • 25663 MODX Staff
      • 12,272 Posts
      Something is definitely not right. Do you have caching turned on? What menu-building snippets are you using? What’s your PHP, Webserver and MySQL versions?

      You’re asking us to tell you what’s wrong without providing adequate information. tongue
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        If you have the javascript files loading in the head of your document template, the whole bunch will be uploaded to the browser whether they are used or not. That is why MODx uses the (admittedly buggy in some releases) loadClientStartupScript and loadClientScript in snippets that need the javascript, so that pages that don’t have that snippet and thus don’t need the javascript don’t have to download it.

        Can you give a link?
          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
          • 21257 MODX Staff
          • 730 Posts
          Hi Steve,

          I chose a page at random to start looking: http://www.lib.usm.edu/index.php?id=531

          It looks to me like your <script> tags which are supposed to load prototype and scriptaculous are generating 404s.
          http://www.lib.usm.edu/manager/assets/images/script/scriptaculous/prototype.js
          http://www.lib.usm.edu/manager/assets/images/script/scriptaculous/scriptaculous.js

          So for each page load, you’re generating 2 additional page loads.

          If you don’t need those libraries, just nix them from your template.
          If you do need the libraries, which you probably don’t since the site isn’t broken - just slow - then they need to be fixed.
          I bet that will make the site feel a little better.

          Mike
            Mike Schell
            Lead Developer, MODX Cloud
            Email: [email protected]
            GitHub: https://github.com/netProphET/
            Twitter: @mkschell
            • 28563
            • 35 Posts
            Mike - good advice - I will try it tomorrow;
            Susan - I’m not sure i know how to use those API functions - within a particular snippet? many of my javascripts exist to support things like rollovers, etc...the link is http://www.lib.usm.edu

            rthrash - caching is definitly on; I use dropmenu on all pages to build a simple left menu, and breadcrumbs up top for a trail. Ditto is used on the front five times, and then sporadically throughout the site (1.01)

            would anybody like to log in to the manager to peruse the site and give suggestions? I’ll even let you pop on the server via ssh if you’d like, to check things out. I really, really, need to get this solved....any takers?

            Steve



              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Interesting. I poked around a bit, and it’s actually one of the snappier sites I’ve been to for a while. but a ton of javascript errors, from the request for the files returning your "page not found" page. Check your paths, including any in the javascript files themselves.

              <script src="/utility.txt"></script>
              <script src="/popup.txt"></script>




                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
                • 28563
                • 35 Posts
                Hi Susan (and thanks for the compliment) and netProphet - I’ve fixed the JS errors - first by fixing the paths (really dumb mistake - calls were to ".txt" instead of ".js") - and then I just removed the calls entirely for de-bugging’s sake. The home page seems to load rather quickly now - an improvement ; however, the rest of the site is still slow and sketchy. The homepage is simply HTML plopped into the content area, but is calling a few snippets and chunks. The rest of the site uses a template setup, which is/are calling header and footer chunks, so there is a definite structural /parsing difference between the index and the rest of the site. Susan - would you like to log in to the manager and poke around? I’m deperate to get the speed issue fixed, and I’m running out of ideas, and I sure don’t want to have to move to another CMS during fall semester - that would be a nightmare...

                S
                  • 33337
                  • 3,975 Posts
                  PM me the details. I’ll try

                  regards.
                    Zaigham R - MODX Professional | Skype | Email | Twitter

                    Digging the interwebs for #MODX gems and bringing it to you. modx.link
                    • 28563
                    • 35 Posts
                    Zi - I sure will, give me a sec...and thanks!
                      • 33337
                      • 3,975 Posts
                      Okay guys, problem was log tables.... 85MB of them tongue this kind of table sizes can even kill a site I think.

                      Just switched off the native visitor stats logging and everything is fine now.... no need to goto another CMS I guess tongue

                      regards.

                      zi
                        Zaigham R - MODX Professional | Skype | Email | Twitter

                        Digging the interwebs for #MODX gems and bringing it to you. modx.link