We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33372
    • 1,611 Posts
    I’m noticing an odd occurence on one of our sites and I wonder if anyone else has seen it. The manager’s index.php file is registering a ton of traffic over the last couple months. It appears to come in spikes (totaling 5.8 million hits to just manager/index.php in March), but I haven’t been able to track down the conditions under which it occurs.

    This began when the site was running 0.9.5 final and has continued with 0.9.5 RC1 (rev 2258). I haven’t tried updating to a 0.9.6 version yet because I’ve had some issues with some CVS exports and I figured I’d wait for the final release. QuickEdit is disabled, the Template Switcher plugin was never installed, and there is nothing in the System Events log.

    Is there any known issue that might cause this, or has anyone else seen similar signs of heavy manager traffic?
      "Things are not what they appear to be; nor are they otherwise." - Buddha

      "Well, gee, Buddha - that wasn't very helpful..." - ZAP

      Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: ZAP at Apr 08, 2007, 10:51 AM

      Is there any known issue that might cause this, or has anyone else seen similar signs of heavy manager traffic?
      Not that I’m aware of ZAP? Does the installation appear to work otherwise? And do you have access to the raw Apache logs to see where it is coming from?
        • 7923
        • 4,213 Posts
        Could it be somehow related to the manager session keep alive thing? I think that was fixed in 0.9.5..


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 33372
          • 1,611 Posts
          I have looked through the access logs and they seem to show the same info that I was getting through the filter of the pre-installed stats program (which references the logs, so that makes sense). The traffic all appears legitimate (it is coming from hosts that the site admins use and seems to be normal work on the site), and although it adds up to a lot of hits it doesn’t appear suspicious or error-related. There are several admins and well over 1000 pages, so perhaps this is just normal use after all.

          In fact the only reason that I even started looking into this issue is that the host tried to charge them for an extra 5 GB of traffic in March, which would’ve meant that this site had 20GB of traffic between when it was launched the night of March 9th and the end of the month. That seemed practically impossible to me, and the traffic logs did not support it either (they showed 5 GB of traffic, whereas the site’s "resource meter" showed almost 20). The tech support person mumbled something nonsensical about how the engineers told him that this was traffic that "didn’t show up properly in the site stats" before giving in and refunding the money.

          So perhaps this is normal and not excessive at all? Or perhaps it is related to the manager session keep alive issue and will go away when we update to 0.9.6. If no one else has this issue and I can’t find any more info that would show it to be more clearly a problem then I guess we can assume that it’s not.
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn't very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 7923
            • 4,213 Posts
            What I meant with the session keep alive is that it didn’t work prior 0.9.5. It didn’t refresh like it should have and that got fixed at some point during 0.9.2-0.9.5, so it would mean that there would be more hits if manager is always open in some computers and something is continuously refreshed to keep the session alive. But I don’t know how it works and if the refreshes would be counted as hits, that was just a guess.. I remember that the session thing refreshes something periodically, but I could be wrong.


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 33372
              • 1,611 Posts
              Hmm well this is post 0.9.5 final, and the sessions definitely work right (man was that a huge improvement; I noticed that right away the first time I installed 0.9.5 and it made me very happy). They actually have tons of MaxiGallery pages (several thousand photos), so a lot of the manager traffic is updating those. I’m definitely going to update to 0.9.6 as soon as the final version is released anyway and see if anything changes.
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 33372
                • 1,611 Posts
                I installed Urchin yesterday in order to dig into this a bit more. Just yesterday there were 46,000 form posts to manager/index.php from a Mac running Firefox 2.0.0.3. At least one of our admins uses that setup, but that’s just way too many posts, and the manager actions log just shows normal use by three admins.

                We had a mySQL problem yesterday as well, and I wonder if that might be related. We were receiving an Error 28 code, which apparently means that the database server is unable to write temporary tables to disk (and there are 38 pages of these errors in the MODx error log, although they were all since April 8th, which is a month after this problem started). I sent a support request to the host, so hopefully that annoyance will get resolved.

                So given that the hits are being recorded as coming from what is probably an actual manager user, what might cause them to loop insanely like this?
                  "Things are not what they appear to be; nor are they otherwise." - Buddha

                  "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                  Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                  • 22303 MODX Staff
                  • 10,725 Posts
                  This was a problem in 0.9.5 that has been resolved in the 0.9.6 RC’s. There were certain error conditions trying to write to database tables that triggered additional errors when it was unable to write to those tables, looping out of control until the process times out or exceeds maximum redirection.
                    • 27376
                    • 576 Posts
                    Might this large traffic consist of the Manager trying to update the unread messages? I found this bit of javascript in [tt]manager/frames/menu.php[/tt] starting at line 31:
                        function updateMail(now) {
                        	try {
                        	  // if 'now' is set, runs immediate ajax request (avoids problem on initial loading where periodical waits for time period before making first request)
                        	  if (now) new ajax('index.php', {postBody:'updateMsgCount=true', onComplete:showResponse}).request();
                    		  new ajax('index.php', {postBody:'updateMsgCount=true', onComplete:showResponse}).request.periodical(<?php echo $modx->config['mail_check_timeperiod'] * 1000; ?>);
                    		  return false;
                        	} catch(oException) {
                              xx=window.setTimeout('updateMail()', 1000);
                        	}
                    	};
                    To me, this looks like a memory leak. Since every time [tt]updateMail[/tt] is called a new periodical request is generated and sent to the server. I discovered that the [tt]updateMail[/tt] function is called EVERY time a new manager page is loaded. So as you can see, this could lead to some very high traffic on the index.php page.

                    By the way, I fixed this leak in the most recent 095dev branch revision. (see this thread for more info)

                    I might point it out once again that I’m a total n00b when it comes to Javascript (and more so with Ajax!), so this might not even be a memory leak.
                      • 33372
                      • 1,611 Posts
                      Quote from: OpenGeek at Apr 17, 2007, 12:25 PM

                      This was a problem in 0.9.5 that has been resolved in the 0.9.6 RC’s. There were certain error conditions trying to write to database tables that triggered additional errors when it was unable to write to those tables, looping out of control until the process times out or exceeds maximum redirection.

                      Are you sure that this is the same bug? From what I remember, the symptoms of that issue were a little bit different. It filled up the error log, whereas the errors reported here are many but no more than 1.5 MB or so and not all in rapid-fire succession.

                      I’ve never had an Error 28 before, which made me think that this really was a database server issue this time.

                      I’ll upgrade to 0.9.6 as soon as it goes final (I don’t want to cause these admins any more stress, and the base_url issue in RC2 seems to still be lurking out there).
                        "Things are not what they appear to be; nor are they otherwise." - Buddha

                        "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options