We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37059
    • 368 Posts
    This afternoon, I made the most unpleasant discovery that our main site, which is powered by MODx 2.0.7-pl Traditional, was down. Accessing its main URL brought up a blank page and a favicon, that’s all. It was up and functioning early in the morning. I cleared the MODx cache, and the site resume functioning at once. Does anybody have any idea what might have caused such craziness? The MODx error log is empty, the cPanel error log is empty, and a look at the raw access log shows nothing unusual.

    huh
      Jason
      • 22303 MODX Staff
      • 10,725 Posts
      For your reference, this issue is known and being worked on. See bug #3111 for more information and to track progress/commits.
        • 37059
        • 368 Posts
        Thanks for letting me know. I see that making the homepage uncacheable is a workaround; I’ll do that.
          Jason
          • 9102 ☆ A M B ☆
          • 318 Posts
          I have a better workaround than making the homepage uncacheable, but it only works if your homepage can be served equivalently as a static HTML file.

          Simply copy the HTML source code for the homepage to a text file, and call it index-static.html.

          Then add this line to your .htaccess right before the friendly URL redirect

          RewriteRule ^$ index-static.html

          This rewrites (note that it’s a rewrite not a redirect, that’s important) requests for root to the static file, while still allowing MODx to serve requests for all other pages. Requests for root will load fast, and the rest of the site can be served fast from the cache.

          Keep in mind that you’ll need to update index-static.html whenever you make changes that affect the content of the homepage.

          By the way, I’m not actually seeing this bug. I implemented the above workaround because I can’t afford to have my homepage go down even for a few minutes, and its content very rarely changes anyway.

            • 37059
            • 368 Posts
            Interesting. How is this better than/substantially different from uncaching the homepage?
              Jason
              • 9102 ☆ A M B ☆
              • 318 Posts
              How is this better than/substantially different from uncaching the homepage?
              Because it’s fast. If you serve the homepage uncached, you have to construct the page each time it’s requested, which is slower and takes up server resources -- that’s the whole point of caching.
                • 37059
                • 368 Posts
                Quote from: esnyder at Feb 23, 2011, 12:26 PM

                How is this better than/substantially different from uncaching the homepage?
                Because it’s fast. If you serve the homepage uncached, you have to construct the page each time it’s requested, which is slower and takes up server resources -- that’s the whole point of caching.

                Oh right, of course. I was thinking a little backwards for a minute there smiley
                  Jason
                  • 22303 MODX Staff
                  • 10,725 Posts
                  This issue is resolved in 2.0.8-pl, which is now available BTW.
                    • 9102 ☆ A M B ☆
                    • 318 Posts
                    Do we have confirmation that this does in fact resolve the bug? Seems like it ought to, but sometimes the unexpected happens...
                      • 22303 MODX Staff
                      • 10,725 Posts
                      Quote from: esnyder at Feb 23, 2011, 01:54 PM

                      Do we have confirmation that this does in fact resolve the bug? Seems like it ought to, but sometimes the unexpected happens...
                      The scripts we setup to reproduce the problem confirmed it is resolved in our test environments. Only deployment into the production environments that are experiencing this problem will tell for sure if all of the problems were related to this issue. But I say with some confidence that it will solve the problem, and the benefits of the simple bug fix representing the only differences between 2.0.7 and 2.0.8 far outweigh the fact that there may be some possibility left of the cache files being written improperly.