We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24374
    • 322 Posts
    I have a site that is using too many "server resources" (RAM, processing time, number of php scripts triggered, etc.) for its hosting plan, and I'm trying to find ways to reduce the resource usage to keep it within its plan specifications. It's in 2.2.16 right now, and I'm wondering if an upgrade to 2.3.5 will reduce the amount of server resources used, or increase it. Does anyone have any experience or stats concerning this?
      • 3749
      • 24,544 Posts
      I don't, but can't resist suggesting that a change to a modx-friendly host would be more likely to help.

      http://bobsguides.com/modx-friendly-hosts.html

      I understand that you don't always have the option, but I've never had a "server resources" problem on any of the listed hosts.

      My guess is that 2.3 is more efficient in many ways, but I don't know how significantly that affects server resources.
        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
        • 24374
        • 322 Posts
        I AM using a MODX-friendly host (Site5) for this site. It's a little perplexing why this site is needing so much processing power. There ARE some complicated aspects to it, and it's a large site, so clearing the site cache and then having three search engines index the site on the same day makes a lot of work for MODX. I've put some search engine delays in place, and banned some others that we don't need indexing the site. That's cut down on traffic a good deal, but more needs to be done.
          • 3749
          • 24,544 Posts
          Do you have a lot of conditional output modifiers? They can do some unnecessary processing. A lot of behind-the-scenes calls to phpThumb can also be a problem.

          Another possibility is a circular reference somewhere.

          You've probably already done this, but if not, visiting various pages while watching the network tab in Firebug or Chrome Dev. Tools might provide some clues.
            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
          • You can also switch to the pdoTools set of snippets as replacements for the usual Wayfinder, getResources, getPage, etc listing snippets. They are much more efficient.

            You may find some things you're using a generic listing snippet for that would be handled more efficiently with custom snippet.

            Sometimes what the client wants is simply not feasible on the less-expensive shared hosting plans. After all, they are intended for Aunt Tillie's cute kitty blog, not business applications. It's like trying to use a Ford Pinto to haul a cabin cruiser over the mountains to the lake.
              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
            • I recently ran into an issue with Site5 and their backups corrupting the assets folder, which has been persistent over the past couple years but having never needed to use the backup I didn't bother/remember to complain. This time, even Site5 couldn't restore the site with any of their backups, up to 30 days. All corrupted and unusable just like the one I had manually created with their backup tool.

              For all intents and purposes, Site5 fails to be MODX friendly. If backing up the site corrupts the assets folder, I call that unfriendly. Cheap hosting is usually oversold hosting, and even a small site's performance (of lack of) is noticeable once the site is on hosting that has enough resources and space on the server.

              You may notice that Site5 is not listed as MODX friendly at Bob's Guides anymore. SkyToaster however is most assuredly the most experienced with MODX Hosting for as little as $6/mo. $5/mo hosting that can't handle MODX or gorks with the resources it uses is no deal, and "unlimited" anything is a red flag for overselling with any host. Imagine what the other shared server sites are stacking up on the same "unlimited" shared server your site is on... unlimited means what? They can store unlimited gb of backups because they never delete them, or what? Could be crazy cat people storing high resolution images of ten thousand uncached cats, you just never know.
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 24374
                • 322 Posts
                I understand you have had some problems with your backups getting corrupted, but I don't agree with your other comments about Site5. For the most part, they have been outstanding with the many MODX sites I have going with them. Criticizing them using the term "cheap hosting" is not fair. You could also call SkyToaster "cheap hosting", because the rates are similar for what you get. I know that Site5 does NOT oversell their servers. I check regularly, and the servers my various sites are on never approach having the disk space be full. Yes, they advertise unlimited disk space, but that's not automatic; you have to request additional space and provide the reason you need it before they will allot more to your account. Storing many GB worth of backups in your server space is not allowed, so they would not approve more disk space for this reason. "Unlimited" means you can get as much disk space as you need, without paying extra, as long as you have a valid reason and it's not going to impact server performance.

                Also, what do you mean by "manually created with their backup tool"? Do you mean "Backups" in the control panel File section? Their control panel is a modification of cPanel, so there's no telling if the problem would not be the same if you were at a different host that uses the stock cPanel setup. Perhaps this particular assets folder has something in it that cPanel doesn't get right in its backups.

                  • 24374
                  • 322 Posts
                  Quote from: BobRay at Aug 19, 2015, 03:34 AM
                  Do you have a lot of conditional output modifiers? They can do some unnecessary processing. A lot of behind-the-scenes calls to phpThumb can also be a problem.
                  No, no conditional output modifiers. I do use a tinyMCE plugin called PlugoBrowser for image placement. It's a great tool that makes it easy to insert images with links to fancybox (or other) slide shows. But it creates the thumbnails on the page by replacing the image source with a php reference (the php file loads the thumbnail, or creates it if it doesn't exist). That can add to up to a lot of processing if there are a lot of images on pages, and the site is getting a lot of indexing traffic. I've added scripting to my content processing script that intercepts the php-based image processing and uses pThumb and Resizer to create and cache the thumbnail and then replace the image reference with the actual thumbnail image rather than the php file. So now all image sources are cached images and not php scripts that need to run.

                  I HAVE managed to reduce the resource usage back to the assigned limits, so the site is OK now, but I am still curious about the difference between 2.3 and 2.2. It does feel snappier, and there is far less delay time when editing pages. Is this all because of changes with ext javascript changes (so it's all happening in the browser), or is the php more efficient as well so that less server processing time is required (both in the manager and when serving pages)? I'd really like to know this, if it's possible.
                    • 24374
                    • 322 Posts
                    Quote from: BobRay at Aug 18, 2015, 11:05 PM
                    I don't, but can't resist suggesting that a change to a modx-friendly host would be more likely to help.

                    http://bobsguides.com/modx-friendly-hosts.html

                    I'm curious as to why you removed Site5. I have had nothing but great support from them on my many MODX sites there, and in general performance is excellent.
                      • 3749
                      • 24,544 Posts
                      Two people I trust reported serious problems there (not with installing MODX or performance, but dealing with issues later - in one case, all site backups made by the host were corrupted).

                      Since I haven't used them myself, I wasn't comfortable recommending them.
                        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