We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48447
    • 10 Posts
    Hello everyone! To begin with, I am new to MODX. Yesterday I tried it and found that page loading is too slow - up to 20 sec.

    My environment:

    Virtual hosting;
    MODX Revolution 2.3.1-pl (traditional);
    ExtJS 3.4.1;
    Smarty 3.0.4;
    mysql 5.5.32-log;
    PHP Version 5.2.17;
    Server API CGI;



    I added 1 thing - Quip, the latest version;
    All initial MODX settings are the same;
    Caching is on;

    In developer tools in Chrome I can see that all external files (js, css, pictures and so on) are taken from the cache and around 97% of total time is waiting for the response from the server.

    An example of special tags (like ^t^) output:

    Query time: 0.0650 s (48 Queries) // Parse time: 13.5103 s // Total time: 13.5753 s // Source: database



    Caching or not snippets (with "!") didn`t seem to be the cause - in both cases pages are very slow.
    I tried to load without snippets - same story, too long. This time just 3-4 sec to load around 20 KB of data instead of 10-15 sec with added snippets. Backend is slow too.

    MODX error log:

    [2014-07-28 12:18:27] (ERROR @ /connectors/lang.js.php) Could not cache system settings.
    [2014-07-28 12:18:27] (ERROR @ /manager/min/index.php) Could not cache system settings.
    [2014-07-28 12:18:27] (ERROR @ /manager/min/index.php) Could not cache system settings.
    [2014-07-28 12:18:27] (ERROR @ /manager/min/index.php) Could not cache system settings.
    [2014-07-28 12:18:28] (ERROR @ /manager/min/index.php) Could not cache context settings for mgr.
    [2014-07-28 12:18:28] (ERROR @ /manager/min/index.php) Could not cache context settings for mgr.
    [2014-07-28 12:18:28] (ERROR @ /manager/min/index.php) Could not cache context settings for mgr.
    [2014-07-28 12:18:28] (ERROR @ /manager/min/index.php) Could not cache context settings for mgr.
    [2014-07-28 12:18:36] (ERROR @ /index.php) Could not cache system settings.
    [2014-07-28 12:18:36] (ERROR @ /index.php) Could not cache system settings.
    [2014-07-28 12:18:36] (ERROR @ /index.php) Could not cache context settings for mgr.
    [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching lexicon topic lexicon/en/core/default
    [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching lexicon topic lexicon/en/core/default
    [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching lexicon topic lexicon/ru/core/default
    [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching lexicon topic lexicon/ru/core/default
    [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching action map mgr/actions
    [2014-07-28 12:18:40] (ERROR @ /index.php) Could not cache system settings.
    [2014-07-28 12:18:42] (ERROR @ /index.php) Could not cache context settings for mgr.
    [2014-07-28 12:18:42] (ERROR @ /index.php) Error caching lexicon topic lexicon/en/core/default
    [2014-07-28 12:18:43] (ERROR @ /index.php) Error caching lexicon topic lexicon/ru/core/default
    [2014-07-28 12:18:43] (ERROR @ /index.php) Error caching lexicon topic lexicon/en/core/default
    [2014-07-28 12:18:43] (ERROR @ /index.php) Error caching lexicon topic lexicon/ru/core/default
    [2014-07-28 12:18:43] (ERROR @ /index.php) Error caching action map mgr/actions




    So, what can I do to fix it? Why is PHP parse time so high?

    PS Some users in other topics mentioned Gravatar as a possible cause of slow work. I switched it off and it didn`t helped - same awful results.

    And one weird thing - reloading the same page with the same content, snippets etc. every time I get different number of queries - from 40 to 58. [ed. note: warior30 last edited this post 9 years, 9 months ago.]
    • Hello,

      My recommendation based on the limited server information you have provided a) Upgrade PHP!!!! b) Switch to FastCGI for PHP.

      The version of PHP you have installed is EOL (http://php.net/eol.php) - this means it's totally unsupported, highly vulnerable, and well no updates for 3+ years... It's going to be slow. In regards to FastCGI vs CGI, well for one it's faster, and more secure. In short these two upgrades alone should improve your site's load time regardless of any other changes.

      That being said you need to tell us more about the site to help you isolate the cause of the problem(s). What extras do you have installed, what are you doing on the page(s) that are slow, what browser are you using, etc.

      Don't forget to tell us more about your hosting environment as well.
        Patrick | Server Wrangler
        About Me: Website | TweetsMODX Hosting
        • 48447
        • 10 Posts
        Thank you for your answer! I updated PHP to 5.3.13 - still nothing sad

        My environment (updated info):

        MODX Revolution 2.3.1-pl (traditional);
        ExtJS 3.4.1;
        Smarty 3.0.4;
        mysql 5.5.32-log;
        PHP Version 5.3.13;
        Server API CGI/FastCGI;
        Platform Type	       Debian
        SERVER_SOFTWARE      Apache/2


        I have installed Quip (the latest version). On that page I show plain text with a couple of images as main content with Quip comment-form below. Also I have Quip LatestComments snippet on the right and another snippet which grabs rss.

        If I switch off those snippets it results that MODX loads 7.7 Kb page in 2.5-5 sec.


        After updating PHP I`ve noticed that another site became really faster but it doesn`t use MODX. Also if it matters MODX is installed in a folder - /htdocs/myfolder/ - and the page is available as www.site.com/myfolder/
        [ed. note: warior30 last edited this post 9 years, 9 months ago.]
          • 20413
          • 2,877 Posts
            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 48447
            • 10 Posts
            I use neither pThumbs nor phpThumbs in my snippets and I have these settings:

            phpthumb_allow_src_above_docroot no
            phpthumb_cache_source_enabled    no
            
              • 4172
              • 5,888 Posts
              seems MODX has problems writing cache-files there.
              Is your cache-directory writable by php?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 48447
                • 10 Posts
                Bruno17, Are you referring to "/core/cache/"? If so, yes, that folder is assigned 0755 rights and actually is full of data (cache).
                  • 48447
                  • 10 Posts
                  And guys, what do you think about error log?

                  [2014-07-28 12:18:27] (ERROR @ /connectors/lang.js.php) Could not cache system settings.
                  [2014-07-28 12:18:27] (ERROR @ /manager/min/index.php) Could not cache system settings.
                  [2014-07-28 12:18:27] (ERROR @ /manager/min/index.php) Could not cache system settings.
                  [2014-07-28 12:18:27] (ERROR @ /manager/min/index.php) Could not cache system settings.
                  [2014-07-28 12:18:28] (ERROR @ /manager/min/index.php) Could not cache context settings for mgr.
                  [2014-07-28 12:18:28] (ERROR @ /manager/min/index.php) Could not cache context settings for mgr.
                  [2014-07-28 12:18:28] (ERROR @ /manager/min/index.php) Could not cache context settings for mgr.
                  [2014-07-28 12:18:28] (ERROR @ /manager/min/index.php) Could not cache context settings for mgr.
                  [2014-07-28 12:18:36] (ERROR @ /index.php) Could not cache system settings.
                  [2014-07-28 12:18:36] (ERROR @ /index.php) Could not cache system settings.
                  [2014-07-28 12:18:36] (ERROR @ /index.php) Could not cache context settings for mgr.
                  [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching lexicon topic lexicon/en/core/default
                  [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching lexicon topic lexicon/en/core/default
                  [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching lexicon topic lexicon/ru/core/default
                  [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching lexicon topic lexicon/ru/core/default
                  [2014-07-28 12:18:37] (ERROR @ /index.php) Error caching action map mgr/actions
                  [2014-07-28 12:18:40] (ERROR @ /index.php) Could not cache system settings.
                  [2014-07-28 12:18:42] (ERROR @ /index.php) Could not cache context settings for mgr.
                  [2014-07-28 12:18:42] (ERROR @ /index.php) Error caching lexicon topic lexicon/en/core/default
                  [2014-07-28 12:18:43] (ERROR @ /index.php) Error caching lexicon topic lexicon/ru/core/default
                  [2014-07-28 12:18:43] (ERROR @ /index.php) Error caching lexicon topic lexicon/en/core/default
                  [2014-07-28 12:18:43] (ERROR @ /index.php) Error caching lexicon topic lexicon/ru/core/default
                  [2014-07-28 12:18:43] (ERROR @ /index.php) Error caching action map mgr/actions
                    • 20413
                    • 2,877 Posts
                    I agree with Bruno... google.com/search?q=site:forums.modx.com+Could+not+cache+system+settings

                    > http://forums.modx.com/thread/31516/package-manager-message-could-not-cache-what-does-it-mean#dis-post-426825 [ed. note: mrhaw last edited this post 9 years, 9 months ago.]
                      @hawproductions | http://mrhaw.com/

                      Infograph: MODX Advanced Install in 7 steps:
                      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                      • 48447
                      • 10 Posts
                      Thank you, guys! I read that topic and assigned 0777 rights to /core/cache/ and it apparently increased loading speed. Now it takes 2-4 sec to load the page with all the snippets instead of 10-15 sec earlier. But aforementioned errors in the log file didn`t disappear.