Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » Increased load time at homepage

  • Resolved Myddna

    (@myddna)


    Hi,

    Today I noticed something weird: my WP blog was taking too much time to load (first byte), around 5-7 seconds.

    If I deactivate all plugins, it goes down to 170-270 ms.
    When I activate everything I have except Jetpack, it goes up to 300-400.
    And finally, when I enable Jetpack (Free plan), it suddenly goes up to 5-7 seconds.
    With everything disabled except for Jetpack it’s the same. It’s only happening in home page.

    WP version: Latest (everything is up to date)
    PHP: 7.3.4
    Theme: Neve (I also tried with Twenty Nineteen, same result)
    Testing in: Chrome
    (let me know if more info is needed)

    I’m leaving the blog configured with only Jetpack enabled, just in case anybody wants to have a look at it.

    • This topic was modified 3 years, 3 months ago by Myddna. Reason: Adding some tags :)

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor James Huff

    (@macmanx)

    Volunteer Moderator

    Make sure that you’re only using the Jetpack modules you want.

    Most of Jetpack is designed to speed up your site by taking load off of your server, like our site accelerator https://jetpack.com/support/site-accelerator/ or stats https://jetpack.com/support/wordpress-com-stats/ subscriptions https://jetpack.com/support/subscriptions/ and related posts https://jetpack.com/support/related-posts/ which are all processed on our end (rather than hammering your database as these features traditionally do).

    With that said though, the more Jetpack modules you add, the more your site has to initially process, just like it would if you added a separate plugin for the features, so always make sure you’re only using the features you want.

    Regarding overall speed and load, here’s an excellent independent report: https://mattreport.com/jetpack-speed/

    However, 400 milliseconds to 5 seconds is indeed unexpected, significantly so.

    I ran some tests via https://www.webpagetest.org/result/190501_PH_14b5e6e01d430424bfd1f013bfa39036/ and https://gtmetrix.com/reports/dispersion.es/Zy9rW8Xc and it seems like the biggest slowdown is time to first byte.

    That’s how long it takes your site to basically respond with “Yes, you have reached a website,” so that all happens before Jetpack or even WordPress loads.

    I recommend checking with your hosting provider’s support on this.

    Thread Starter Myddna

    (@myddna)

    Hi James!

    Thank you for your response.

    I’ve been using Jetpack for years, and I’m aware it can slow down a bit the website (nothing noticeable), but until now it was fine.

    These are your tests run again now that I’ve deactivated Jetpack (no active plugins left!):
    https://www.webpagetest.org/result/190501_N7_15abd2f1ef4de4421af386d0d80d641a/
    https://gtmetrix.com/reports/dispersion.es/iF3R0AnH

    Maybe the issue is communication between my server (Strato) and Jetpack servers. I’ll run some tests tomorrow.

    Thanks again πŸ™‚

    Thread Starter Myddna

    (@myddna)

    Hi,

    More tests: Same server, different WordPress installation: https://desvania.es. It has Jetpack and a handful other plugins. This one works ok.

    Things that I tried today at dispersion.es:

    • Disconnect and reconnect Jetpack (with different wordpress.com account)
    • Completely deleted and reinstalled the plugin
    • Cleaned up old settings and variables in wp-config and .htaccess
    • Ran wp-cli checksums test, cleaned old files and reinstalled the core from wp-admin/update-core.php
    • Tried Jetpack Debug Tool https://jetpack.com/support/debug : OK on desvania.es, “Could not access your home page” on dispersion.es
    • Self test at: https://dispersion.es/wp-admin/admin.php?page=jetpack-debugger
      [9] => Array
              (
                  [name] => test__wpcom_self_test
                  [pass] => 
                  [message] => Jetpack.com detected an error.
                  [resolution] => Visit the Jetpack.com debugging page for more information or contact support.
                  [group] => Array
                      (
                          [0] => default
                      )
      
              )

      (full version https://pastebin.com/8SBQ6ihV)

    I’m running out of ideas :/

    Plugin Contributor James Huff

    (@macmanx)

    Volunteer Moderator

    That’s odd, I’m not seeing any blockers on this end.

    Do you still have the same slowdown if Jetpack is the _only_ active plugin?

    Thread Starter Myddna

    (@myddna)

    Just right now, everything off except jetpack: https://www.webpagetest.org/result/190503_R7_d9df7ec99656bbb0202bfb5cf2a073b6/
    And same test failing in jetpack debugger

    Still happening :/

    Plugin Support lizkarkoski

    (@lizkarkoski)

    Howdy –

    I just ran https://dispersion.es/ through https://jetpack.com/support/debug/ and there were not any reported errors. It passed the debugger. Are you still seeing the errors?

    Thread Starter Myddna

    (@myddna)

    Just tried https://dispersion.es/ too again through https://jetpack.com/support/debug/ and the message still is “Could not access your home page” Oo.

    From the inside, still fails “test__wpcom_self_test”. https://pastebin.com/fymRhngh

    Well, maybe it’s time to make a clean an empty install, and try it again to rule out something wrong in my database :/.

    I’ll let you know the results.

    Thank you for your time.

    Plugin Contributor James Huff

    (@macmanx)

    Volunteer Moderator

    Hm, so theoretically, the slow down could be caused by Jetpack constantly failing to connect, so it’s waiting for resources that never materialize. Not something I’ve seen before, but in theory it’s sound.

    I checked https://jetpack.com/support/debug/?url=https%3A%2F%2Fdispersion.es%2F again but it’s all green, maybe it’s the time we’re checking?

    Could you be using any rate-limiting that would be blocking us only occasionally?

    Thread Starter Myddna

    (@myddna)

    If that’s happening, I don’t know what could be doing it.

    One of the plugins I tested was Wordfence plugin some months ago, but it is uninstalled (and I made sure to remove all .htaccess content and .user.ini file related to it, in addition to search all apache config files for the string auto_prepend_file just in case).

    Since Jetpack has a lot of submodules, this morning I’ve deactivated all and enabled them one by one (only the ones I like to use). The test was OK until I arrived to Shortcode Embed. Suddenly, the delay appeared.

    If I disable them all again, there is no delay. If I enable Shortcode Embed only, there is delay. (This submodule is enabled on my other wp installs working ok).

    Sooo time for me to read a bit of code. And if I don’t see anything, the next thing will be the clean install.

    Thread Starter Myddna

    (@myddna)

    I think I found it! πŸ˜€

    I went to jetpack_load_shortcodes() and loaded $shortcode_includes one by one to see which one was to blame. It was *instagram.php* file.

    Then I started to disable the handlers, and noticed that jetpack_instagram_handler was firing on homepage. This post https://dispersion.es/como-vectorizar-lettering/ has the following valid instagram URL: https://www.instagram.com/p/Bbkj_ZgBKG1/ but the handler returns ‘<!– instagram error: no embed found –>’ instead of the embed (which is odd, because the URL is OK and my instagram account is not protected).

    Debugging the handler right now πŸ™‚

    UPDATE:
    It seems that the instagram api call lasts longer than the default 5 seconds timeout (If I set the timeout in wp_remote_get to 10 seconds, it finally loads the instagram embed). I will remove the url from the post from now and test why WP_Http is so slow in my server.

    Thanks for your help πŸ™‚

    • This reply was modified 3 years, 3 months ago by Myddna. Reason: Update with latest finds
    Thread Starter Myddna

    (@myddna)

    Epilogue: Dishonor on me, dishonor on my cow. I recently updated my php version to 7.3 and didn’t notice that php7.3-curl was not available. Downgraded to 7.2 and everything is ok now. v_vU

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Increased load time at homepage’ is closed to new replies.