We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    I navigated to one of my MODx sites today and a blank page loaded. The site is MODx 2.2.12 and hosted at GoDaddy. I've not really had any issues like this on this site.

    I went to the error log and found the following:
    [2014-06-03 15:10:54] (ERROR @ /connectors/layout/modx.config.js.php) Error caching lexicon topic lexicon/en/core/resource
    [2014-06-03 15:14:50] (ERROR @ /connectors/layout/modx.config.js.php) Error caching lexicon topic lexicon/en/core/resource
    [2014-06-05 13:11:50] (ERROR @ /connectors/browser/directory.php) Error caching lexicon topic lexicon/en/core/source
    [2014-06-05 13:39:39] (ERROR @ /connectors/lang.js.php) Error caching lexicon topic lexicon/en/core/resource

    There was also an error related to Unknown mySQL server dated May 5, but I have been in making updates several times to the site since May 5 and the site was working fine.

    I cleared the error log. Then cleared the site cache. Now the website loads fine in the browser.

    Question is:
    Would these types of errors cause the site to not load any content — essentially a blank page?

    Bigger Question:
    Has this site been down since June 3?

    Biggest Question:
    How can I prevent this from happening in the future and what's the best way for me to monitor? Does everyone go to every website they've developed every day to confirm that they are running. Is there some type of alert system that I can implement — maybe an email gets generated to myself, etc.?
      • 19872
      • 1,078 Posts
      Just following up on this situation, I double checked my manager actions log, and my last updates were made June 5, and I'm confident that the site was loading fine on that day, and perhaps for at least the next several days.

      At the moment, I am concerned that I don't know when the site went down — assuming it went down and has been down for many days — and what caused it to go down. Perhaps it just happened that today, as I went to the site, it was down. Clearly has something to do with the database not delivered content. Odd that after clearing the error log and site cache, the home page of the site loads successfully.

      I have had severals instances of this blank page scenario many times with another MODX site at goDaddy. That site however is on a really old plan and server. The plan is supposed to be migrated to newer servers in the near future as they phase out the older plans. The situation is oddly similar though. Blank page on load, but then clearing the error log and site cache seems to fix.

      While I can understand perhaps a server being overtaxed and connection to database being lost, I would think as things setting down, the site would function again, but that does not seem to be the case. Seems like whatever interruption that is caused does not get resolved until I log in to the manager and clear the cache. Certainly not a good situation to get a call from the client and have no idea how long the site has been down and how best to prevent this from happening somewhere else.

      I know. I know. Host somewhere else. But in the meantime, any additional feedback would be greatly appreciated.
        • 3749
        • 24,544 Posts
        First of all, for security reasons, you should update to the latest version as soon as possible. That might also reduce the odds of this happening again.

        It's hard to say exactly what happened, but if I had to guess, I'd say that the server got overloaded and that somehow resulted in the cache being corrupted. Some people create a cron job to delete all the files in the core/cache directory periodically to deal with the problem.

        Theoretically, you could have a cron job calling a PHP script that uses cURL to load a particular page and then checks its content against what should be there. If it's not right, you could send yourself and email and/or clear the cache files.
          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
          • 19872
          • 1,078 Posts
          Thanks for the feedback Bob. I am planning to update the MODX version, though I do not suspect the version to the be culprit. More than likely it's an overload & corrupt cache issue, since my clearing the site cache immediately fixed it.

          Creating a cron job sounds like a good idea...if only I knew what that was and how to create it. I've seen mention of the terminology elsewhere on the forum, so I'll do some research. In the meantime, I'll just check the site manually on a very regular basis until I can learn to develop a cron job.
            • 3749
            • 24,544 Posts
            A cron job, in this case, is something you set up on the server that executes a particular PHP file on some schedule.


            There's a good tutorial here: http://www.thesitewizard.com/general/set-cron-job.shtml

            There's an extra that helps set one up, but be aware that if the site is down, you can't run a snippet by visiting a MODX page. You'd have to have it execute a stand-alone PHP file instead.

            http://modx.com/extras/package/cronmanager

              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
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              You could set up something like Pingdom or Nodeping to check your website every few minutes. If you set it to search for some content you are 100% sure should exist on the page (for example, some text from your footer) it can alert you when something goes wrong.
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 19872
                • 1,078 Posts
                Hi Bob:

                Thanks for these links. That tutorial is excellent. In terms of the extra, if a site is down and not loading content, then it's probably not loading the extra either? I interpret the site being "down" in my case as the database not being able to deliver content to a page or, vice versa, a site page not being able to go and get content from the database. So, I'm guessing that I need an independent php file that as you mentioned, "that uses cURL to load a particular page and then checks its content against what should be there." And this is where I begin to develop that glazed deer in the headlights appearance. This seems to be getting into the realm of server management. I'm verring briefly and approaching from an alternate direction, reviewing my site build, and investigating what goDaddy has to say about the situation.

                I have MODX running at 3 different hosting companies. GoDaddy to date is the only host where this issue of the blank page has occurred on 2 different MODX installs.

                Just got off the phone with goDaddy support, and they mentioned a possibility that too many connections to the database were opened up and possibly some not being closed, eventually using up all of the available connections causing the site to stop loading content. I might do a review of my site and the various TVs and chunks and see if perhaps there is something there that would cause this situation. Yesterday I noticed an instance where I had a TV for an image on a resource, and the manager for a that resource still shows a jpeg selected in the TV, yet I had removed the TV from the template. Not sure whether that could cause some kind of vicious cycle between the server and the database is worth considering as a possible cause or not. GoDaddy has turned on an error log to help track errors on there end. Maybe between the their log and my MODx log more insight can be gained. Support said the could monitor spikes in server activity, but only for the past hour...not several days ago. It would be more beneficial to know what activity was happening on the server at the time MODX generated errors in the MODX error log at the time my site began to display a blank page.
                  • 19872
                  • 1,078 Posts
                  Quote from: markh at Jun 12, 2014, 05:35 AM
                  You could set up something like Pingdom or Nodeping to check your website every few minutes. If you set it to search for some content you are 100% sure should exist on the page (for example, some text from your footer) it can alert you when something goes wrong.

                  Thanks Mark. I'll look into your suggestions.

                  My head is kind of spinning at the moment. A bit frustrated with goDaddy. Not sure if it's me or if it's them. I am willing to accept blame if it's me. Currently looking at skytoaster for hosting, thinking it may be a better fit for the MODx sites I'm building. I don't really expect them to troubleshoot my novice site developments, but hoping at least that when issues do develop, I may be able to more quickly rule out the host as the culprit.
                    • 19872
                    • 1,078 Posts
                    I just checked the error log and now there is a new error:

                    [2014-06-12 03:16:14] (ERROR @ /connectors/system/settings.php) Could not prepare context: asdasdas

                    Does anyone know what this means? The "asdasdas" seems random & suspicious.
                      • 19872
                      • 1,078 Posts
                      On my initial post I mentioned that this build was 2.2.12, but realize that it's actually 2.2.6. Oh my!

                      Do you think someone is attempting to hack the site? I will update to the latest MODx later today, and as Bob mentioned, maybe that will resolve the issues.