We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38678
    • 24 Posts
    Environment:

    Network Solutions VPS running Apache
    MODx 2.0.7
    PHP 5.2.17
    MySQL 5.1.55

    Looking for ideas / best practices to tune performance, in addition to suggested upgrade to 2.0.8 by MODx support.

    Other background info:
    - Page loading seems sluggish (3-5 seconds) and sometimes even longer
    - After a page loads, I can click and get an attachment like a PDF almost instantly, so assuming that's pulling the PDF off the web server, I suspect some front-end issues
    - We had corrupt DB issue about a week ago and MODx support helped us find and fix it. I don't have any benchmark on the page load times I can point to for sure, but the site was faster (I think) pre-incident.

    Pretty sure I am going to upgrade to at least 2.0.8, but curious if there are any other best practices for cache management or configuration settings I should consider.

    Cheers all.
      • 38678
      • 24 Posts
      FYI, the web site is www.netuitive.com

      My sales rep says response time is fairly consistent from 4-10 seconds, with the News and Blog pages taking the longest. Interesting since a News post was where we had a DB corruption issue which was discovered and fixed by MODx support.
        • 33968
        • 863 Posts
        Home page loaded quickly for me, but the News page did take about 10 seconds.

        Are you able to post the template used on that page, including any snippet calls used for loading in the article summaries?

        Also, were you able to find out what caused the corrupted db?
          • 38678
          • 24 Posts
          Lucas - not a developer, just the site owner, but if by template you mean the template code for the home page, I have attached it as a .txt file.

          I don't know if the template variable settings make a big difference or not.

          Curious you say the home page loaded quickly. I am getting 3-4 seconds at least, sometimes more, and my remote sales staff gets the same, so it's not a bandwidth issue. I would really like the pages to load in 1-2 seconds if possible.

          As far as the cause of the corrupted db, still a slight mystery. But what MODx support discovered was a recursive reference in the DB for a resource. Turns out the resource was a News (PR) post that somehow got saved as or overwrote the news archive folder that was it's parent - so you had a resource trying to be parent and child at the same time. 2 days before the site went down, the news archives just disappeared from the web site and the CMS resources. Then I guess the recursion got the best of the site since it was trying to resolve the news headline on the home page and the site and DB just gave up and went down.

          MODx moved the resource to the root and fixed the problem and that got the site up again, and I have since reorganized the resources.

          But that's when we noted site sluggishness, especially the news and blog pages.

          Along the way, in doing our own troubleshooting, my CTO did an install of MODx 2.0.7 on top of the existing one (didn't fix the problem). Wonder if that affected any cache or other settings, or if any 3rd party packages were not completely reinstalled. [ed. note: ggillen last edited this post 14 years, 8 months ago.]
            • 33968
            • 863 Posts
            Hi there - I'd thought the home page loaded quickly yesterday but can confirm it's around 4 seconds for me now too.

            All the snippet calls are uncached in the home page template you provided, which means your server and database are having to generate the content on every page load rather than being quickly pulled from the cache.

            If it's content that doesn't change regularly - the masthead/main slideshow for example - it should absolutely be cached and you should notice a speed increase.

            You might test this by making a copy of the template code you've added here, then removing the '!' from the beginning of all the getResources snippet calls (be careful making changes to a live site!):
            [[!getResources... ]]
            

            to:
            [[getResources... ]]
            

            This will mean your news section won't be updated when new articles are added and you should just do it to check temporarily. However you will at least get an idea if those are what is slowing your home page down.

            Note: there may also be other snippets contained within the sidebar and site header/footer that aren't apparent from the template you provided. If they are also uncached then I'm almost certain that's what's slowing everything down. [ed. note: okyanet last edited this post 14 years, 8 months ago.]
              • 38678
              • 24 Posts
              Thanks or the suggestion Lucas. I will give it a shot.
              If it does speed things up but prevent refreshing of things like the PR headline, one solution would be to clear the cache on each occasion that we post a new Press Release, coorect? If this is coordinated with my PR guy and only happens occasionally, that should work.

              Unless there is a setting somewhere to automatically clear the cache periodically?

              I'll let you know how the speed changes now that I have some benchmarks.
              Thanks.
                • 33968
                • 863 Posts
                The cache could be partially refreshed using a plugin, but yes, manually clearing it after news posts would be the simplest solution without requiring any development.

                I would have a look in the 'top' chunk as there may also be an uncached call to the Wayfinder snippet which has been known to slow things down for some implementations.