We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11858
    • 130 Posts
    My site at www.centurionrunning.com over the last couple of days has experienced extreme slowdown. I've been talking to bluehost (I have a bluehost pro account) and they've directed me (https://www.bluehost.com/cgi/help/000564) to a mysql_slow_queries log which doesn't seem to show what the problem is. Contents below:

    # Fri Sep  2 07:12:50 2011
    # Query_time: 4.611636  Lock_time: 0.000110 Rows_sent: 0  Rows_examined: 1
    use centuri8_centurionmodx;
    UPDATE `modx_menus` SET `parent` = 'components',`action` = 1,`description` = 'quip_desc',`icon` = 'images/icons/plugin.gif',`menuindex` = 0,`params` = '',`handler` = '',`permissions` = '' WHERE `text` = 'quip'
    
    # Fri Sep  2 06:51:07 2011
    # Query_time: 2.860000  Lock_time: 0.000085 Rows_sent: 0  Rows_examined: 0
    use centuri8_centurionmodx;
    INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('tgkeu930pol91rkq2doal34go7', 1314967865, 'modx.user.0.attributes|a:1:{s:3:\"web\";a:3:{s:16:\"modAccessContext\";a:1:{s:3:\"web\";a:1:{i:0;a:3:{s:9:\"principal\";i:0;s:9:\"authority\";s:1:\"0\";s:6:\"policy\";a:1:{s:4:\"load\";b:1;}}}}s:22:\"modAccessResourceGroup\";a:0:{}s:17:\"modAccessCategory\";a:0:{}}}modx.user.0.resourceGroups|a:1:{s:3:\"web\";a:0:{}}modx.user.contextTokens|a:0:{}')
    
    # Fri Sep  2 05:01:14 2011
    # Query_time: 3.926329  Lock_time: 0.000101 Rows_sent: 0  Rows_examined: 0
    use centuri8_centurionmodx;
    INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('3f2hl753jcsp60e5n4a5bju816', 1314961270, 'modx.user.contextTokens|a:0:{}')
    
    


    These are ~4 second delays, not the 20+ seconds I'm experiencing when loading pages. The manager is quick so I'm assuming it could be some random snippet that I have coded but the site was running fine and I haven't added any snippets since the slowdown. The modx error log shows some errors with getfeed not parsing an rss feed but this is not on every page load.

    I know there's not much to go on which is the reason I'm posting this. How can I debug this and find out what the root of the problem is?
      • 22303 MODX Staff
      • 10,725 Posts
      You might try using The Executioner to find out how long specific Snippets are taking to execute.

      The slow query log showing session inserts taking multiple seconds makes me think your database server is overloaded. They definitely should not be taking that long. You might try changing session_handler_class to blank in your System Settings to use standard PHP file-based sessions to see if this reduces the slow downs significantly or not.
        • 11858
        • 130 Posts
        You won't believe it. Twitter has blocked a range of bluehost shared server ip addresses, so when trying to fetch feeds it would take FOREVER and eventually time out, resulting in 40+ second loads.

        From what I gather, this is also happening with other RSS feeds - for example, the manager is super slow now too - I assume the news comes through an rss feed? I disabled getfeed, I removed all references to twitter, reenabled getfeed and the site was still slow. I can only assume all rss feeds are now blocked/slow on bluehost? I have to keep getfeed disabled until they fix the issue. With getfeed disabled, everything is super fast.

        They couldn't tell me when they would be unblocked, apparently they have a "ticket" open with twitter. sigh.
          • 33968
          • 863 Posts
          Ah man, I hope you haven't pulled out too many hairs over this!

          Have you considered lazy loading those feeds? That would allow the parts of your site you do have control of to load quickly, leaving the feeds to load up whenever they feel like it.

          A quick search turned up this blog post which I hope you find useful (not sure exactly how you're pulling in those feeds):

          http://friendlybit.com/js/lazy-loading-asyncronous-javascript/
            • 36816
            • 109 Posts
            Hat-rack,

            I came across this thread just in passing, but I too had exactly the same problem on a Bluehost-hosted site, starting about the same time you did.

            In case more information / confirmation helps:

            Disabling my RSS pull from Twitter fixed it. A Facebook RSS pull on the same page posed no problem.
            Turning the Twitter pull back on; slowdown resumed as before, so it's off for now. Think it's Twitter only, though. The feeds pulled from the Manager are fast as usual.

            I understand bandwidth issues on RSS grabs, but hey, I'm one of the good guys; I cache my feed pulls; no more than once/hour. <smile>

            I'd been using anon. RSS pulls from Twitter. Haven't yet implemented an OAuth pull to see if that isn't subject to the slow-down.