• Resolved ugoclemente

    (@ugoclemente)


    Hi,
    I installed Hummingbird to speed up a news and e-commerce website. Now the site is fast for all guest not logged-in but it’s very slow (from 20 secs to 60 secs to load the homepage) when a visitor is logged in (users admin, author, subscriber).

    I noticed that, when I log-in, two console 404 error appear in Chrome dev-tools: “Failed to load resource: the server responded with a status of 404 (Not Found)” and it refers to two javascript files.

    Furthermore, the console reports another issue: “DevTools failed to load SourceMap: Could not load content for https://[mysite.it]/wp-content/uploads/hummingbird-assets/wphb-lazy-load.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE”.

    Another issue: I cannot enable browser caching. In the Browser Caching page I have this message: “4 of your cache types don’t meet the recommended expiry period of 1 year. Configure browser caching below.”. But if I try to configure the expiring time, either for “All type files” and for “Individual file types”, it doesn’t work.

    Nevertheless, I noticed that the browser caching code has been written correctly in my .htaccess file, but in the Browser Caching page in WordPress backend still reports the expiring time as “disabled” for all the file type (Javascript, CSS, Media and Images).

    There is still another issue: something is blocking the images of the posts when I share the posts link on Facebook or WhatsApp.

    I would like to keep using Hummingbird as a cache plugin, but I can’t solve these problems.

    Could you help me? Thank you

    • This topic was modified 2 years, 11 months ago by ugoclemente.
    • This topic was modified 2 years, 11 months ago by ugoclemente.

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

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter ugoclemente

    (@ugoclemente)

    Update, my site completely crashed. Maybe the plugin was going on minifying CSS and JS and at the end the site was unreachable.

    I deactivated all the Hummingbird optimizations and now the site is reachable again, but I can’t deactivate page caching.

    Now the plugin is still installed and active, but I would like to understand where’s the problem before doing anything.

    I need some advice. Thank you.

    Plugin Support Adam – WPMU DEV Support

    (@wpmudev-support8)

    Hi @ugoclemente

    I hope you’re well today and thank you for contacting us!

    Now the site is fast for all guest not logged-in but it’s very slow (from 20 secs to 60 secs to load the homepage) when a visitor is logged in (users admin, author, subscriber).

    The only difference there should be is that for logged-in users site (front-end) may be or not be cached, depending on the how you configured Page Cache in Hummingbird. But if it’s set to be disabled for logged-in users, it shouldn’t slow down the site. The cached (for non-logged visitors) version should be faster and non-cached (for logged-in users) should be pretty much the same as it was before adding cache.

    If it’s slower then it suggests that there’s an issue with server resources. The fact that site crashed at some point also confirms that. Note please: I’m not saying that server is underpowered – it may be but it as well may be a matter of some unexpected conflict with theme or some other plugin.

    Are you using any other optimization or caching plugins on site currently? Could you also check please what are

    – current version of PHP of the site
    – value of WP_MEMORY_LIMIT constant
    – and value of PHP memory_limit setting?

    All that can be checked on “Tools -> Site Health” page in “Info” tab. Let us know about those, please.

    I noticed that, when I log-in, two console 404 error appear in Chrome dev-tools: “Failed to load resource: the server responded with a status of 404 (Not Found)” and it refers to two javascript files.

    This can confirm some conflict but can you please specify what are those reported (missing) JS files?

    Furthermore, the console reports another issue: “DevTools failed to load SourceMap: Could not load content for https://[mysite.it]/wp-content/uploads/hummingbird-assets/wphb-lazy-load.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE”.

    This can be completely ignored and it doesn’t affect site and/or Hummingbird at all. Source maps are special (and not “obligatory”) files to help developers see optimized JS in browser’s developer tools in a “human friendly” way. But that’s all. The error itself doesn’t even happen at all when browser console is not open in browser. It’s not that you can’t see it – it just doesn’t happen.

    Another issue: I cannot enable browser caching. In the Browser Caching page I have this message: “4 of your cache types don’t meet the recommended expiry period of 1 year. Configure browser caching below.”. But if I try to configure the expiring time, either for “All type files” and for “Individual file types”, it doesn’t work.

    Nevertheless, I noticed that the browser caching code has been written correctly in my .htaccess file, but in the Browser Caching page in WordPress backend still reports the expiring time as “disabled” for all the file type (Javascript, CSS, Media and Images).

    Browser caching relies on headers set by server. It’s not “done” by Hummingbird. Hummingbird can only control it (via the rules added to .htaccess) if server is configured to allow this. If the rules are there and yet no changes are applied it often means that the caching rules either cannot be set (because host doesn’t allow/accept such configuration) or there’s something additional (often it’s e.g. some proxy or CDN) overriding it.

    Please get in touch with your host and ask them if it’s allowed and possible to control browser caching settings (expiry headers) via .htaccess in this case. Make also sure that there are no “duplicate” settings for this in .htaccess (I’ve seen cases where there were some “leftovers” from other plugins and they were causing issues).

    There is still another issue: something is blocking the images of the posts when I share the posts link on Facebook or WhatsApp.

    Hummingbird doesn’t contain any features that are meant to block that. If you disable Hummingbird the same is happening? Is there any additional security plugin active on site such as e.g. our own Defender?

    I deactivated all the Hummingbird optimizations and now the site is reachable again, but I can’t deactivate page caching.

    Actually, this is something that might also be an important clue: if you deactivate Hummingbird plugin then the Page Cache (the one that Hummingbird provides) cannot work. It’s not possible for it to stay active if the plugin is disabled. But if you see in page source the comment that page cache is still active, it means that there’s another cache – either another caching plugin or a server-side cache and we are dealing with “clash of caches” where “one cache is caching content of another cache”. Such situation can have lead to quite an unpredictable outcome so

    – if there’s any other caching plugin active at the same time, it should be disabled
    – if there’s a server-side cache, it would be best to clear it and temporarily disable, see if the issues related to Hummingbird are gone then, try to fully configure Hummingbird with all the options that you need and try to enable that server-side cache only after that.

    Best regards,
    Adam

    Thread Starter ugoclemente

    (@ugoclemente)

    Hi Adam, thank you for your reply.

    `Are you using any other optimization or caching plugins on site currently? Could you also check please what are

    – current version of PHP of the site
    – value of WP_MEMORY_LIMIT constant
    – and value of PHP memory_limit setting?`

    I’m not using any other ptimization neither caching plugin on my site.

    . current version of PHP: 7.4.18
    – value of WP_MAX_MEMORY_LIMIT constant: 256M
    – value of PHP memory_limit setting: 512M

    This can confirm some conflict but can you please specify what are those reported (missing) JS files?

    The missing JS files are:

    https://[mysite]/snippets/text.js
    https://[mysite]/mode-less.js

    Hummingbird doesn’t contain any features that are meant to block that. If you disable Hummingbird the same is happening? Is there any additional security plugin active on site such as e.g. our own Defender?

    Ok, thank you. I think I will ignore this problem for a while. I’d like to solve the problem of the slow page loading.

    `Actually, this is something that might also be an important clue: if you deactivate Hummingbird plugin then the Page Cache (the one that Hummingbird provides) cannot work. It’s not possible for it to stay active if the plugin is disabled. But if you see in page source the comment that page cache is still active, it means that there’s another cache – either another caching plugin or a server-side cache and we are dealing with “clash of caches” where “one cache is caching content of another cache”. Such situation can have lead to quite an unpredictable outcome so

    – if there’s any other caching plugin active at the same time, it should be disabled
    – if there’s a server-side cache, it would be best to clear it and temporarily disable, see if the issues related to Hummingbird are gone then, try to fully configure Hummingbird with all the options that you need and try to enable that server-side cache only after that.`

    I don’t use any other caching plugin. I don’t think I have a server-side cache but I will check and I will make some test. Then I will update this topic.

    Thank you for your help, now I have more elements to work on.

    • This reply was modified 2 years, 11 months ago by ugoclemente.
    • This reply was modified 2 years, 11 months ago by ugoclemente.
    • This reply was modified 2 years, 11 months ago by ugoclemente.
    • This reply was modified 2 years, 11 months ago by ugoclemente.
    • This reply was modified 2 years, 11 months ago by ugoclemente.
    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @ugoclemente

    Thank you for the update.

    From your configuration, it seems the PHP and WP defines are fine,

    Which theme are you using?

    Could you please install the Query Monitor and check if it will report any slow log or errors from Hummingbird:
    https://wordpress.org/plugins/query-monitor/

    I noticed that, when I log-in, two console 404 error appear in Chrome dev-tools: “Failed to load resource: the server responded with a status of 404 (Not Found)” and it refers to two javascript files.

    Those don’t seem related to the Hummingbird, just in case, can you access the site using: domain/?avoid-minify=true

    Kindly also enable the debug mode to find if any important log will show up: https://wpmudev.com/blog/debugging-wordpress-how-to-use-wp_debug/

    Let us know the result you got.
    Best Regards
    Patrick Freitas

    Thread Starter ugoclemente

    (@ugoclemente)

    Hi Patrick, thank you for your answer.

    I use Tagdiv Newspaper 10.4. I noticed that If I disable the plugin TagDiv Composer, which manage the frontend page editor of the theme, the errors in the DevTools console disappear.

    Those don’t seem related to the Hummingbird, just in case, can you access the site using: domain/?avoid-minify=true

    I did it and the errors in console disappeared, so at the moment I have disabled the Asset Optimization in HummingBird and I don’t see errors any more.

    By disabling Asset Optimization I also solved another issue: file compression blocked the plugin Query Monitor when I visited the frontend of my website. With Asset Optimization disabled everything works fine, now. Maybe I should check the compression of css and js files one by one, to understand which ones I’d better keep uncompressed.

    Anyway, now I undestand that when I’m not logged in, the site is fast thanks to the cache, while when I’m logged in, the site is slow because I can see the non-cached homepage. It simply means that my site is slow, so I should setup Hummingbird in the right way to speed up my site.

    Query monitor doesn’t report any error related to Hummingbird, but I noticed that most of the queries come from the plugin TagDiv Composer (the frontend page editor of the theme): 421 queries in 498.

    Thank you very much.

    Thread Starter ugoclemente

    (@ugoclemente)

    Now I see two PHP errors in Query Monitor panel. The text is the same:

    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or queued before wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This warning was triggered by the jquery-cookie handle. Read Debugging in WordPress for more information. (This message was added in version 3.3.0.)

    In the field “Place of the event” it shows these two functions:

    wp-includes/functions.php:5313
    _wp_scripts_maybe_doing_it_wrong()
    wp_enqueue_script()

    Furthermore, I noticed that in my Site Health panel, in the “Drop in section”, there is “advanced-cache.php
    Plugin avanzato di memorizzazione nella cache.”.

    So I connected to my server and I found two advanced-cache.php files:

    # find . -name “advanced-cache.php”
    ./wp-content/advanced-cache.php
    ./wp-content/plugins/hummingbird-performance/core/advanced-cache.php

    Maybe is another caching plugin that can be in conflict with Hummingbird cache?

    Thank you.

    • This reply was modified 2 years, 11 months ago by ugoclemente.
    Plugin Support Adam – WPMU DEV Support

    (@wpmudev-support8)

    Hi @ugoclemente

    Thank you for responses!

    By disabling Asset Optimization I also solved another issue: file compression blocked the plugin Query Monitor when I visited the frontend of my website. With Asset Optimization disabled everything works fine, now. Maybe I should check the compression of css and js files one by one, to understand which ones I’d better keep uncompressed.

    Anyway, now I undestand that when I’m not logged in, the site is fast thanks to the cache, while when I’m logged in, the site is slow because I can see the non-cached homepage. It simply means that my site is slow, so I should setup Hummingbird in the right way to speed up my site.

    Yes, it is possible that Asset Optimization may be “breaking” some features/aspects of the site. After all, it affects JS/CSS files (and quite often JS does rely on CSS too in a way) so while in most cases Asset Optimization – especially if set to automatic mode – should work just fine out of the box, there are cases when it require some more tweaking.

    You can try enabling it back and after re-checking files, switching it to Manual mode and you’ll see a full list of CSS/JS files along with set of options (though don’t use “don’t load” one) for each file – to compress, combine and “inline, move to footer” for CSS or “move to footer, load after page is loaded” for JS. It might take some “experimenting” to set that up correctly but given some patience and “trial and error” it would let you optimize assets really well while keeping the site still fully operational without issues.

    Now I see two PHP errors in Query Monitor panel. The text is the same: (…) In the field “Place of the event” it shows these two functions: (…)

    It means that some code on site is using these functions incorrectly. Usually these are functions used by the theme but it may as well be other plugin. If you look into Query Monitor again, what does it say for thes errors in “Dependencies” and “Dependents” columns?

    Also, this is happening with Hummingbird and its Asset Optimization enabled or disabled?

    Furthermore, I noticed that in my Site Health panel, in the “Drop in section”, there is “advanced-cache.php
    Plugin avanzato di memorizzazione nella cache.”.

    It’s correct that this file shows up in two places. The “advanced-cache.php” file is a special file (so called “drop-in”) that is necessary to provide cache capability. Hummingbird has such file in its own folder but when you activate Page Cache file it puts a copy of that file in “/wp-content/” folder because this is where it has to be – that’s where “drop-in” need to be added in WordPress.

    However, I understand that there is no other caching plugin on site currently – but if there was one in the past it’s quite possible that the “/wp-content/advanced-cache.php” file is incorrect. Different caching plugins can put a bit different code inside that file and it’s not “cross-compatible”.

    So if Page Cache in Hummingbird is not enabled at all or if it is enabled but gives a warning about advanced-cache.php file then do this, please:
    – make sure that Page Cache in disabled in Hummingbird
    – and that there for sure is no other caching plugin active
    – delete the “/wp-content/advanced-cache.php” file
    – then enable Page Cache in Hummingbird again; it will regenerate correct “advanced-cache.php” file in /wp-content

    Kind regards,
    Adam

    Thread Starter ugoclemente

    (@ugoclemente)

    Hi @wpmudev-support8 Adam

    You can try enabling it back and after re-checking files, switching it to Manual mode and you’ll see a full list of CSS/JS files along with set of options (though don’t use “don’t load” one) for each file – to compress, combine and “inline, move to footer” for CSS or “move to footer, load after page is loaded” for JS. It might take some “experimenting” to set that up correctly but given some patience and “trial and error” it would let you optimize assets really well while keeping the site still fully operational without issues.

    Ok, I will check each file optimization to optimize assets. Thank you.

    It means that some code on site is using these functions incorrectly. Usually these are functions used by the theme but it may as well be other plugin. If you look into Query Monitor again, what does it say for thes errors in “Dependencies” and “Dependents” columns?

    Also, this is happening with Hummingbird and its Asset Optimization enabled or disabled?

    I found out the breaking point, following your advice and looking in the Query Monitor panel.

    In my child theme function.php file, I had two wp_enqueue_script functions outside the callback function called by the wp_enqueue_scripts hook. So I just cut and pasted the two functions inside the callback function and the error disappeared. Thank you.

    So if Page Cache in Hummingbird is not enabled at all or if it is enabled but gives a warning about advanced-cache.php file then do this, please:
    – make sure that Page Cache in disabled in Hummingbird
    – and that there for sure is no other caching plugin active
    – delete the “/wp-content/advanced-cache.php” file
    – then enable Page Cache in Hummingbird again; it will regenerate correct “advanced-cache.php” file in /wp-content

    I did it and everything works fine.

    I will test new HummingBird cache and assets optimization settings now.

    Thank you, have a nice day.

    • This reply was modified 2 years, 10 months ago by ugoclemente.
    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @ugoclemente

    I hope you are doing well

    Feel free to keep us posted on the results.

    Best Regards
    Patrick Freitas

    Thread Starter ugoclemente

    (@ugoclemente)

    Hi Patrick @wpmudevsupport12.

    In my test site I could setup Assets optimization properly, testing each file optimization step by step and the site sped up.

    But now I tried to do the same on my production site. I have the same plugins on that site, it’s the exaxt copy of the test version, but when I activate Assept optimization the site is very slow (30-40 seconds to load the homepage, in frontend as in backend, even if I’m not logged in as admin).

    Therefore I cannot save my setup in the Asset optimization admin page. Even if I click on “Clear cache” or “Publish changes”, It goes back to the default settings.

    Something is blocking the plugin functionality and I am trying to understand what’s going on, but I would like to avoid the site to crash, because this is the one that people visit every day.

    Even if I try to deactivate Assept optimization in the Setting panel, it keeps assept optimization enabled. The only way to shut down it is deactivating the plugin.

    I’d be glad for your help.

    • This reply was modified 2 years, 10 months ago by ugoclemente.
    • This reply was modified 2 years, 10 months ago by ugoclemente.
    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @ugoclemente

    So the issue is happening on the live site but not on staging using the same installation.

    This could be related to the number of access on the live site while staging the website we don’t have those site stress.

    Is it happening on the live site when only Hummingbird is enabled?

    Any different report in Query Monitor?

    Best Regards
    Patrick Freitas

    Thread Starter ugoclemente

    (@ugoclemente)

    Hi Patrick @wpmudevsupport12

    So the issue is happening on the live site but not on staging using the same installation.

    Exactly. Same WordPress Version, same theme, same plugins, same Ubuntu Version, Same Apache version, same PHP version. The only things different are posts records in database and media files in the wp-content/uploads folder.

    On the public version of the site there are posts and pics from March 2018 to now. On the test version there are posts and images of one month: June 2018.

    This could be related to the number of access on the live site while staging the website we don’t have those site stress.

    Maybe. But if this is the reason, I don’t have any chance to setup Assets Optimization on my live site.

    Is it happening on the live site when only Hummingbird is enabled?

    Yes. I installed the WordPress.org community “Health Check & Troubleshooting” plugin and I enabled the Diagnostic mode to test the plugin compatibility.

    With all the other plugins disabled, Hummingbird plugin still have the same issues. If I try to activate Asset Optimization, it performs the files check but then it doesn’t activate this tool and it comes back to the Asset Optimization page with the blue button “Activate”.

    Any different report in Query Monitor?

    Query monitor panel reports a huge number of “Slow queries” coming from some plugins, such as the theme pagebuilder plugin (the theme is TagDiv Newspaper, the pagebuilder plugin is TagDiv Composer). Therefore, I noticed that the process “mysql” running on my server involves a massive CPU usage (from 150 to 400%!).

    I did a reboot of the server, I restarted apache but these problems are still there.

    I cannot understand what causes this issue. I hope you can help me to understand what’s happening.

    I even sent a support request to the producer of my theme. I hope they will help me as well. But, as I said before, Hummingbird Asset Optimization is not working even in the Diagnostic mode, with TagDiv Composer plugin disabled.

    Thank you very much

    • This reply was modified 2 years, 10 months ago by ugoclemente.
    • This reply was modified 2 years, 10 months ago by ugoclemente.
    • This reply was modified 2 years, 10 months ago by ugoclemente.
    • This reply was modified 2 years, 10 months ago by ugoclemente.
    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @ugoclemente,

    Could we know the server resources of both staging and live site used? Are both the same?

    You can confirm that by creating a file in the root directory, for example, info.php and adding the following code inside both staging and live site:
    <?php phpinfo(); ?>

    Once done, you can load the info.php file on the browser side, ie for example:
    your-live-site.com/info.php

    The above page would give memory_limit and max_execution_time, are these values the same for staging and Live when compared? Do you notice any improvements if you try to increase these resources? or the issue is still the same?

    Query monitor panel reports a huge number of “Slow queries” coming from some plugins, such as the theme pagebuilder plugin (the theme is TagDiv Newspaper, the pagebuilder plugin is TagDiv Composer). Therefore, I noticed that the process “mysql” running on my server involves a massive CPU usage (from 150 to 400%!).

    Just to be sure are these tests performed with only Tag Div and Hummingbird plugin activated? or were other plugins active during that time?

    If you notice the same issue even if Hummingbird is temporarily deactivated, then this would give a better idea where exactly to look at, ie whether it’s within Hummingbird or the theme side.

    Since you have already sent a support request to the theme, please do let us know what they have to say regarding the issues noticed., so that we could further escalate if needed.

    Please do let us know how that goes. Looking forward to your response.

    Kind Regards,
    Nithin

    Thread Starter ugoclemente

    (@ugoclemente)

    Hi Nithin @wpmudevsupport11,

    I followed your advice but it still doesn’t work.

    I explain what I’ve done:

    Could we know the server resources of both staging and live site used? Are both the same?

    The above page would give memory_limit and max_execution_time, are these values the same for staging and Live when compared? Do you notice any improvements if you try to increase these resources? or the issue is still the same?

    I checked the phpinfo.php pages and I found this asset:

    Staging site:
    memory_limit = local value: 128M; master value: 300M
    max_execution_time = local value: 3000; master value: 600

    Live site:
    memory_limit = local value: 3000M; master value: 3000M
    max_execution_time = local value: 300; master value: 300

    I modified max_execution_time on the live site, editing the /etc/php/7.4/apache2/php.ini file and setting max_execution_time to 3000 (in the mysite/phpinfo.php page now max_execution_time local value is 3000; master value: 3000).

    Then I tested Hummingbird plugin again.

    It does perform Asset Optimization files check, but then it doesn’t activate Asset Optimization and it goes back to the “Activation” page.

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @ugoclemente

    Thank you for the information,

    I wouldn’t suggest using values like 3000 for execution time or 3GB for Memory Limit, you can ser values like 300 to execution time and 512M for Memory limit to prevent any plugin get stuck and use the entire memory for too long time.

    Could you please send me an email to contact@wpmudev.org using this template:

    Subject: “Attn: Patrick Freitas”
    Message: link back to this thread for reference

    Best Regards
    Patrick Freitas

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Hummingbird: slow site for logged users, browser caching error, posts link bug’ is closed to new replies.