We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12938
    • 5 Posts
    I’m finding both the MODx manager and the site it creates to be a bit sluggish. The site itself is about 50 pages and all normal stuff - mostly text - using Ditto to aggregate some news, the Breadcrumbs snippet and Wayfinder for the menu. It varies but sometimes it can take over 5 seconds for a page to load and it is similarly sluggish when using the Manager.

    Are there any simple things that I could do - or maybe should avoid doing - in order to get a better response speed?

    Also, is there a way of analysing the speed of a server in order to eliminate this as a factor?


      • 25663 MODX Staff
      • 12,272 Posts
      That sounds incredibly, terribly out of character. The modx site itself is thousands of pages and runs on a very modest server and doesn’t render that slowly.

      What version are you running, and what plugins are your running?
      Are you using caching?
      Have you put the timing indicators in the footer to see which bit is taking a long time?
      Have a link to your site?
      Where is it hosted?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 12938
        • 5 Posts
        The version is 0.9.6.1p2.
        The only plugin I’m using is TinyMCE (I’ve disabled QuickEdit) and I am using caching.

        I’ll put the timing indicators in the footer and see what that yields.

        Whilst looking up the version etc, I managed to get a PHP Parse Error - I don’t know if that has anything to do with it.

        MODx encountered the following error while attempting to parse the requested resource:
        « PHP Parse Error »

        PHP error debug
        Error: mysql_connect() [function.mysql-connect]: Too many connections
        Error type/ Nr.: Warning - 2
        File: /sites/rich19/htdocs/manager/includes/extenders/dbapi.mysql.class.inc.php
        Line: 87
        Line 87 source: if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd, true))) {

        Parser timing
        MySQL: 0.0000 s (0 Requests)
        PHP: 0.0266 s
        Total: 0.0266 s
        Error while inserting event log into database.

        I’ve always found MODx to be pretty quick so I was suprised by how this particular site was behaving (especially as it’s not that complicated a site).
        I’m wondering if the problem is down to the server - I’m not sure how I can quantify that though.

          • 25483
          • 741 Posts
          that error tells you that your mysql has to many open connections. So I think your mysql server (or some who over uses it) is the problem
            with regards,

            Ronald Lokers
            'Front-end developer' @ h2o Media

            • 12938
            • 5 Posts
            Thanks for your help - it’s a shared server but I don’t know how it’s operated beyond that.

            I put in the timing indicators and it comes up with some wildly differing times - here are a selection:

            Query time: 17.7952 s, Query count: 5, Parse time: 0.0566 s, Total time: 17.8518 s, Source: database
            Query time: 0.1402 s, Query count: 7, Parse time: 0.0506 s, Total time: 0.1908 s, Source: database
            Query time: 0.0205 s, Query count: 6, Parse time: 0.0435 s, Total time: 0.0640 s, Source: database
            Query time: 0.0249 s, Query count: 7, Parse time: 0.0694 s, Total time: 0.0943 s, Source: database
            Query time: 3.5452 s, Query count: 4, Parse time: 0.0237 s, Total time: 3.5689 s, Source: database
            Query time: 0.0106 s, Query count: 1, Parse time: 0.0589 s, Total time: 0.0695 s, Source: cache
            Query time: 6.0333 s, Query count: 4, Parse time: 4.7058 s, Total time: 10.7391 s, Source: database
            Query time: 35.1784 s, Query count: 4, Parse time: 0.0224 s, Total time: 35.2009 s, Source: database
            Query time: 3.0845 s, Query count: 1, Parse time: 0.0451 s, Total time: 3.1296 s, Source: cache

              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Sounds like a badly overloaded shared server. Some of these can have 400 or more sites on the same server.
                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