We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Depends on what you're doing on the site. Saving a resource clears the cache, so the next time each page gets viewed its entire menu and any other listing structure (Ditto, for example) has to be re-done. Generating thumbnails for galleries or image TVs, or even uploading large images, can also use up a lot of memory.

    Try a simple snippet to dump all the data in memory and you'll get quite a shock. The first two comments on this entry might be useful.

    http://php.net/manual/en/function.var-dump.php

    For my site, just a snippet using get_defined_vars() produces a listing that has 956,356 lines and when saved as a file weighs in at 958K. And that for some reason isn't showing the three multidimensional arrays for the listings and maps for the resources which also get loaded into memory.

    The site cache contains all templates, chunks, snippets, and plugins, but not TVs. So if your site uses a lot of these the cache can become quite large. It also contains three arrays reflecting the Tree structure in different ways, so the more resources the bigger the cache will be. This entire cache gets loaded at run-time. One way to reduce the cache is to use a single "include" snippet with a parameter to indicate the file to include, have the code in files for all templates, snippets and chunks instead of storing the whole template, snippet or chunk code in the database as well as the cache file, and use that one snippet call in the element's content field to include the desired file.

    http://sottwell.com/working-snippets.html [ed. note: sottwell last edited this post 14 years, 7 months ago.]
      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
      • 22574
      • 181 Posts
      Thanks Scottwell, the spikes only seam to happen on login for a few seconds then its fine. I'll look into it.
        • 36933
        • 35 Posts
        Hi Susan,

        I am getting the problem on a fresh install of EVO 1.05 as soon as I logged into manager after install. So the problem does not seem to be related to the amount of resources or even traffic to the website. As it is happening for me on new domains where no-one is visiting yet.

        I have never had the error on the front end of the websites, just in the manager and if I refresh the frames (top, menu and main) the error pretty much goes away for that entire manager session. So it really does seem to be something on the initial manager load that is doing it.

        Brad
          • 20096
          • 12 Posts
          I'm having the exact same problem on 7 clients sites that all run evo and are hosted by greengeeks. none of them are big sites, but I reallllllly don't want to transfer hosts. They can refresh their way through it, but man, does it seem unprofessional from my end. any updates on this?
            • 36782
            • 109 Posts
            Hi
            I'm sorry to say that the official response from Greengeeks (I confirmed this several times with direct questions, and got it from top-level) is that ModX doesn't run on thier shared hosting. They say that it is too resource hungry and that you need to get their VPS at least in order to run Modx.

            I tried and tried, I fought with them for months because I, like you, did not want to go host-hunting again, and go though the 16hour days to get clients' sites up and running, etc. But ever since they switched to Cloud Linux, it's been an absolute circus, and finally they told me Modx won't run on their servers.
            Yay. smiley

            Wish I had better news for you.

            I have actually had pretty excellent experience @ Vexxhost.com -- BUT, you will have to get them to tweak or turn off mod_security (I asked them to just turn off one part of it, but they just nix the whole thing) so that you can use tags in your resources and elements.
            I run two MODx revo sites on vexxhost.

            Just a further note on this: Greengeeks still has their advert in the 'hosts' section of the ModX website, crowing about how you can use softaculous to install it, and even give you a discount if you enter 'modx' in the coupon code. I told them that was disingenuous but they didn't respond.

            People will say we should shell out for VPS, but these are tiny sites - 5 pages, no ecommerce, nothing. Probably Modx is overkill for the sites, actually smiley
              • 20096
              • 12 Posts
              I had the exact same experience this week. I had a reseller account with Greengeeks. Kinda sad, they did have very helpful customer service except for this one completely fatal incompatibility. I switched to hostgator- a tiny bit pricier, but the switch has so far gone smoothly as they just transfer the cpanels. And I haven't gotten any pesky 500 errors thus far.

              Greengeeks sucks for modx. :/
                • 36933
                • 35 Posts
                This is actually a real concern for me, as I assume more and more hosts will be moving to cloud linux and therefore these problems will then occur with the new host if I switch. Then we will have the same fight with that host's support team and the hours lost trying to sort it out.

                I still think the question must be asked of MODX and why it is so resource hungry on a new install of 1.05, yet if I refresh the frames once the 500 error has occurred, it won't happen again for that session.
                  • 20096
                  • 12 Posts
                  frustrating that there was never a simple way to transition from evo to revo, which doesn't seen to generate the problem. everything is fine for new sites, but all of the old ones seem doomed to deal with this.

                  mine got so bad that I couldn't even refresh my way out of it.
                    • 3749
                    • 24,544 Posts
                    FWIW, I've had excellent luck with both Evolution and Revolution on Bluehost for several years with very inexpensive shared hosting: http://bit.ly/Hb5CAY


                    MODX also has hosting partners listed here http://modx.com/partners/hosting-saas/ though I see they still list GreenGeeks.


                    ---------------------------------------------------------------------------------------------------------------
                    PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                    MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 14 years, 6 months ago.]
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      I've had years of experience installing hundreds of sites on servers all over the world, and have never yet had this happen. Evo even runs happily on free hosting services. I suspect something else going on with Greengeeks. I've never had occasion to use them.

                      Does Revo work?
                        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