We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7111
    • 30 Posts
    My host disabled my website because of load spiking issues and I need to get the site re-enabled ASAP. I was hoping someone can help me as I have no idea where to start.

    There were certain points in the notification email pointing to two key issues that caused the heavy load, attempting to read and remove session files in /tmp/sess_* and some scripts that put users in a "never ending" re-direct loop.

    I think I know what is causing the second issue, I think it’s the [!firstchildredirect!] snippet call in containers I have in the archives. But I can’t fix that until the first issue is solved. Anyone know what I need to modify to fix the sessions issue?

    Here’s the email I received from my host about the problem:

    Hello,

    I’m writing to inform you that due to some issues with your scripts
    running on thecountyedge.net, we’ve been forced to temporarily disable it
    to get the system load under control.

    The first issue is that it appears to be attempting to read and then
    remove php’s session files in /tmp/sess_*. This will not work, as you
    cannot read or remove any files in /tmp which are owned by another user.
    Please change your script so it is not doing this, as it is causing very
    heavy load on the system. You might want to go as far as to change where
    your session data is stored, by using php’s ini modification functions at
    runtime.

    The second issue, is that your script appears to put users into a
    redirect loop, with ever-lengthening urls. Looking at your request logs,
    we see requests for this:

    dpmoore
    http://www.thecountyedge.net/news/inside-stories/news/inside-stories/news
    /inside-stories/news/front-page/news/inside-stories/news/front-page/news/
    inside-stories/news/front-page/news/inside-stories/news/columnists/news/i
    nside-stories/news/view-from-the-edge/news/columnists/news/view-from-the-
    edge/news/columnists/news/inside-stories/news/inside-stories/news/front-p
    age/news/front-page/news/front-page/news/columnists/news/inside-stories/n
    ews/columnists/news/inside-stories/news/inside-stories/news/front-page/ne
    ws/inside-stories/news/front-page/news/columnists/news/inside-stories/new
    s/inside-stories/news/inside-stories/news/inside-stories/news/inside-stor
    ies/news/inside-stories/news/inside-stories/news/inside-stories/news/fron
    t-page/news/inside-stories/news/inside-stories/news/front-page/news/insid
    e-stories/news/front-page/news/inside-stories/news/inside-stories/news/fr
    ont-page/news/inside-stories/news/columnists/news/inside-stories/news/ins
    ide-stories/news/inside-stories/news/inside-stories/news/inside-stories/n
    ews/inside-stories/news/columnists/news/inside-stories/news/inside-storie
    s/news/columnists/news/inside-stories/news/inside-stories/news/inside-sto
    ries/news/columnists/news/inside-stories/news/columnists/news/inside-stor
    ies/news/inside-stories/news/columnists/news/inside-stories/news/inside-s
    tories/news/inside-stories/news/inside-stories/news/front-page/news/insid
    e-stories/news/inside-stories/news/inside-stories/news/columnists/news/co
    lumnists/news/inside-stories/news/columnists/news/columnists/news/columni
    sts/news/inside-stories/news/inside-stories/news/inside-stories/news/fron
    t-page/news/inside-stories/news/front-page/news/columnists/news/inside-st
    ories/news/columnists/news/inside-stories/news/inside-stories/news/front-
    page/news/inside-stories/news/columnists/news/inside-stories/news/inside-
    stories/news/front-page/news/front-page/news/inside-stories/news/inside-s
    tories/news/inside-stories/news/inside-stories/news/view-from-the-edge/ne
    ws/inside-stories/game-night-to-benefit-literacy-council.html?q=news/insi
    de-stories/news/inside-stories/news/inside-stories/news/front-page/news/i
    nside-stories/news/front-page/news/inside-stories/news/front-page/news/in
    side-stories/news/columnists/news/inside-stories/news/view-from-the-edge/
    news/columnists/news/view-from-the-edge/news/columnists/news/inside-stori
    es/news/inside-stories/news/front-page/news/front-page/news/front-page/ne
    ws/columnists/news/inside-stories/news/columnists/news/inside-stories/new
    s/inside-stories/news/front-page/news/inside-stories/news/front-page/news
    /columnists/news/inside-stories/news/inside-stories/news/inside-stories/n
    ews/inside-stories/news/inside-stories/news/inside-stories/news/inside-st
    ories/news/inside-stories/news/front-page/news/inside-stories/news/inside
    -stories/news/front-page/news/inside-stories/news/front-page/news/inside-
    stories/news/inside-stories/news/front-page/news/inside-stories/news/colu
    mnists/news/inside-stories/news/inside-stories/news/inside-stories/news/i
    nside-stories/news/inside-stories/news/inside-stories/news/columnists/new
    s/inside-stories/news/inside-stories/news/columnists/news/inside-stories/
    news/inside-stories/news/inside-stories/news/columnists/news/inside-stori
    es/news/columnists/news/inside-stories/news/inside-stories/news/columnist
    s/news/inside-stories/news/inside-stories/news/inside-stories/news/inside
    -stories/news/front-page/news/inside-stories/news/inside-stories/news/ins
    ide-stories/news/columnists/news/columnists/news/inside-stories/news/colu
    mnists/news/columnists/news/columnists/news/inside-stories/news/inside-st
    ories/news/inside-stories/news/front-page/news/inside-stories/news/front-
    page/news/columnists/news/inside-stories/news/columnists/news/inside-stor
    ies/news/inside-stories/news/front-page/news/inside-stories/news/columnis
    ts/news/inside-stories/news/inside-stories/news/front-page/news/front-pag
    e/news/inside-stories/news/inside-stories/news/inside-stories/news/inside
    -stories/news/view-from-the-edge/news/inside-stories/game-night-to-benefi
    t-literacy-council.html 4898735 /home/dpmoore/thecountyedge.net/index.php

    Something tells me this isn’t an intended effect, and because if this,
    also, load was spiking on the server.

    Please resolve these issues with your scripts and we can go ahead and
    re-enable the site for you. If you have any questions, please feel free
    to ask!

    Thanks!

    Please, if you have any idea how I can resolve this, I will be eternally grateful!

    Thanks,

    -Derek
      • 7111
      • 30 Posts
      OK, so so far I have added a session save path via .htaccess (below) since I have no access to the php.ini file and created the folder to store the session files and chmoded that folder to 700 permissions.

      php_value session.save_path "/path/to/site/root/tmp"


      Is there anything else I should do? I can’t access the site manager at all, only ftp.

      I have notified my host about my changes, hopefully I can get re-enabled.
        • 3749
        • 24,544 Posts
        I don’t think that will solve your lengthening URL problem. Take a close look at the chunks and snippets involved in your "inside-stories" page. I believe you have a circular reference there.

        You might satisfy your host by promising to unpublish that page until you figure out what the problem is.
          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
          • 7111
          • 30 Posts
          Yeah, I know it won’t fix that problem, but it should fix the sessions problem. (I hope)

          As to the "inside-stories", it’s a folder (container) that contains other documents. It does contain a snippet call to [!firstchildredirect!] as well though, nothing I can do about it until my host responds or re-enables the site though.

          I can’t disable that page as it’s an integral part of the site. I can remove the snippet though, but like I said, nothing I can do right now.

          Thanks for taking the time to help, BobRay smiley
            • 7231
            • 4,205 Posts
            Was the site working fine and then started with this problem? Or was the site released recently already with this issue?

            The url looks like it is including all the pages in the news section into one string.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 7111
              • 30 Posts
              The site has been chugging along nicely since November 11th of 2007, albeit a little slow lately, but I figured that was due to the high volume of documents. I think there’s a little over 1700 documents (pages) including archives.

              I agree about the url. It does appear so. I went and looked at the access logs myself and there are a few instances of the following:

              213.22.175.53 - - [22/Jan/2009:09:07:41 -0800] "GET /news/inside-stories/news/inside-stories/news/inside-stories/news/front-page/news/inside-stories/news/front-page/news/inside-stories/news/front-page/news/inside-stories/news/inside-stories/SPCC-to-offer-international-pathophysiology-course.html HTTP/1.1" 200 18413 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)" 


              I’m not sure how this is happening, if I can get the site back up, first thing I’ll do is test this request myself to see what happens.

              This just really sucks because the site is published every Friday with fresh content and tonight just so happens to be the night that I have to publish! Bah!
                • 7111
                • 30 Posts
                OK, the site is back up, finally.

                Could someone please help me troubleshoot the problems I’m having? I welcome any input as to what is causing the redirect issue and if my solution to changing the session save path above will work.

                Here’s what I have done in the .htaccess file in the root directory:

                php_value session.save_path "/home/dpmoore/thecountyedge.net/tmp/"


                Should that be sufficient? I’m at a loss as to what to do. I’ve turned the site off until I can diagnose the issues above and fix them for sure, I can’t afford to have the site disabled again. If all else fails, I guess I’ll have to move the site to my VPS, but since the owners of the site are not paying me for use of my VPS, I really don’t want to.

                If you need me to turn the site back on, just say so, and I’ll re-enable it for a bit.

                My installation of ModxCMS is version 0.9.6 rev 2767

                Installed snippets that are in use:
                SiteMap
                WebLoginPE 1.3.0
                eForm 1.4.4
                FirstChildRedirect 1.0
                WayFinder 2.0
                Ditto 2.1 BETA 2
                Reflect 2.1 BETA 2
                AjaxSearch 1.7.0.2

                Plugins:
                SEO Strict URLs 1.0.1

                I’m getting rid of every plugin I don’t use, and disabling snippets and checking the site to see if performance increases any, but I’m not getting anywhere.

                Please, any help is welcome.
                  • 7231
                  • 4,205 Posts
                  If it is a MODx version prior to 0963 make sure that the Reflect exploit has been covered.

                  Also check the System Event report and see if there is a trace of what is causing the problem.
                    [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                    Something is happening here, but you don't know what it is.
                    Do you, Mr. Jones? - [bob dylan]
                    • 7111
                    • 30 Posts
                    Thanks guys, that’s good advice.

                    @dev_cw: Yes, I saw that notice a while back, I do need to check that ASAP. I also need to upgrade the whole site to 9.6.3 as well.

                    @ganeshXL: Yeah, I’m going through the snippets and plugins one by one, making notes and upgrading where I can or disabling/deleting completely if I don’t use them.

                    Also, DocFinder? You mean DocManager? I’m not sure how to accomplish what your saying. Is that a separate module?

                    And thanks, I’m trawling through those threads as we speak. I’ll try upgrading AjaxSearch and see if that solves it.

                    I’ll be sure to report back with any results.

                    Keep the tips coming! You guys are great!
                      • 7111
                      • 30 Posts
                      Oh my god, how did I ever miss that? That will help tremendously!