• Resolved inspired888

    (@inspired888)


    Hi there.

    Thanks for this plugin.

    It worked fine for past week or so. But today our site went down due to the plugin. Here’s some error log info that might be helpful.

    [Tue Sep 19 07:21:25.998753 2023] [proxy_fcgi:error] [pid 22494:tid 140021981939456] [client 112.213.42.15:0] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function shell_exec() in /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-content/plugins/dynamic-front-end-heartbeat-control/heartbeat-controller.php:408\nStack trace:\n#0 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-content/plugins/dynamic-front-end-heartbeat-control/heartbeat-controller.php(419): get_system_load_average()\n#1 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-settings.php(462): include_once('/home/608767.cl...')\n#2 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-config.php(103): require_once('/home/608767.cl...')\n#3 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-load.php(50): require_once('/home/608767.cl...')\n#4 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-admin/admin-ajax.php(22): require_once('/home/608767.cl...')\n#5 {main}\n  thrown in /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-content/plugins/dynamic-front-end-heartbeat-control/heartbeat-contr...', referer: https://www.REMOVED/garden-store/filters/use/pasture/

    It causes an Apache server error, which standard server message:

    Service Unavailable
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.Apache/2.4.57 (Debian) Server at www.mckaysgrassseeds.com.au Port 80

    After host did something with the services on the server, WordPress started to load again, but showing it’s critical error page:

    There has been a critical error on this website

    The only way to prevent that was the disable the plugin (renaming its folder).

    Any thoughts?

    Jonathan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Codeloghin

    (@loghin)

    Hi Jonathan,

    Thank you for reaching out. Based on the details you have provided here the issue is coming from your hosting resources being overloaded. The plugin is not causing the crash. The error you are seeing happens when the host becomes too overcrowded and the plugin can’t access the server load data anymore and it logs the error.

    You can go to the WP Admin Area > Settings > DFEHC and move the Priority Settings slider value to the leftmost position then save. This might not solve your issue if your hosting resources are still being used up by other plugins or visitors, but it will further maximize the hosting resource usage.

    Since you stated this issue happened recently, I recommend you look into any increase in visitors or changes in visitor behaviors and patterns while using your website.

    If you have installed any other plugins it’s best you look into them as well as some might have cron jobs or be more memory-consuming.

    Without knowing your current hosting package resources, existing plugins, and visitor statistics I can’t further estimate what exactly is causing your hosting resources to be capped. The plugin will maximize your resource usage as much as it can, however, if your resources are used up to the limit you need to either look into upgrading your hosting plan or try to get rid of unnecessary plugins that might overload your setup. Once your website reaches a certain popularity, no matter how minimal your plugins use is, upgrading the hosting plan will usually be the only viable option.

    You should also look into WP Rocket as I can see that is one plugin that is in use. It’s known to cause capacity problems when clearing the cache and preloading the pages on shared hosting plans that have hundreds of pages(products). The issue comes from the preload operation where hosting resources can’t keep up with the high number of pages it needs to get ready to serve. There are guides on how you can limit the preload speed to better fit your hosting plan resources. Hope this helps!

    You can always reach out to me with your hosting details and temporary access to your website for further troubleshooting.

    Kind regards,

    Thread Starter inspired888

    (@inspired888)

    Hi there,

    Thanks for your helpful and thorough reply.

    I’ve found out from the host (Cloudways, 8GB, 3CPU VM) caused the server to go down (and give Service Unavailable error) was that the memory allocated to PHP was insufficient. They only had 128M allocated, which seems rather low to me. Yesterday they increased it to 2040M to resolve the Service Unavailable error, and that brought server back online.

    It was at that point that WordPress was then able to load, and it would display the standard “Critical error” message (on front and back end).

    Disabling the dynamic heartbeat plugin was the only was to stop that. That was not resource related, as far as I can tell.

    I am now looking through error logs, and finding a lot of instances of this error. It appears to occur roughly two times every minute. It appears these errors are caused by the Dynamic Heartbeat plugin, as it’s the only plugin that has the function ” ” within its code.

    [Mon Sep 18 00:19:57.334828 2023] [proxy_fcgi:error] [pid 31292:tid 140552200681216] [client 180.191.64.224:0] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "dfehc_track_and_expire_user_activity" not found or invalid function name in /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/class-wp-hook.php:312\nStack trace:\n#0 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#1 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-admin/includes/ajax-actions.php(3494): apply_filters()\n#2 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/class-wp-hook.php(310): wp_ajax_heartbeat()\n#3 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()\n#4 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()\n#5 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-admin/admin-ajax.php(188): do_action()\n#6 {main}\n  thrown in /home/608767.cl...', referer: https://www.REMOVED.com.au/wp-admin/edit.php?s=tas&post_status=all&post_type=shop_order&action=-1&m=0&payment_method&_customer_user&_shop_order_shipping_provider&paged=1&action2=-1
    

    At the time WP was having a critical error, the error message in the logs was:

    [Mon Sep 18 06:08:12.258095 2023] [proxy_fcgi:error] [pid 27004:tid 140552402106112] [client 121.200.4.109:0] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "dfehc_track_and_expire_user_activity" not found or invalid function name in /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/class-wp-hook.php:312\nStack trace:\n#0 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#1 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-admin/includes/ajax-actions.php(3494): apply_filters()\n#2 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/class-wp-hook.php(310): wp_ajax_heartbeat()\n#3 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()\n#4 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()\n#5 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-admin/admin-ajax.php(188): do_action()\n#6 {main}\n  thrown in /home/608767.cl...', referer: https://www.REMOVED.com.au/wp-admin/post.php?post=80764&action=edit

    That appears to be related to backend activity (post editing). Whereas the one I shared yesterday was for front-end activity.

    Just now I have tried to re-activate the plugin. It won’t activate due to same critical error:

    Plugin could not be activated because it triggered a fatal error.
    
    Fatal error: Uncaught Error: Call to undefined function shell_exec() in /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-content/plugins/dynamic-front-end-heartbeat-control/heartbeat-controller.php:408 Stack trace: #0 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-content/plugins/dynamic-front-end-heartbeat-control/heartbeat-controller.php(419): get_system_load_average() #1 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-admin/includes/plugin.php(2318): include_once('/home/608767.cl...') #2 /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-admin/plugins.php(192): plugin_sandbox_scrape() #3 {main} thrown in /home/608767.REMOVED.com/gpnhmcjwnz/public_html/wp-content/plugins/dynamic-front-end-heartbeat-control/heartbeat-controller.php on line 408

    Thanks for the suggestions regrading WP Rocket.

    I also greatly appreciate your offer to take a look at what might be causing excessive resource usage. For now, I’m not able to grant access to the site. I’ll need to get my client (the site owner) to permit that. It’s a busy ecommerce site with a fair bit of private data on it.

    What are your thoughts on the above errors? I am pretty certain they are not due to lack of server resources.

    Thanks very much.
    Jonathan

    • This reply was modified 1 year, 6 months ago by inspired888.
    Plugin Author Codeloghin

    (@loghin)

    Thank you for your reply. Indeed, nowadays most websites need a minimum allocated memory of 256-512M. Without access to your hosting environment data, I can’t give a definitive answer.

    What could help me further troubleshoot this is if you create a file in your root folder of the website containing your phpinfo(); output. Simply create a php file named “info” and place it in https://www.mckaysgrassseeds.com.au/info.php and add the following code in it:

    <?php phpinfo(); ?>

    This will provide just technical data and have no impact on personal data or other sensitive information. You can have it removed after troubleshooting.

    It might be that your host has a security/firewall feature that blocks the plugin from accessing data about your server load when it keeps trying to access it during the moment of being out of memory. It also seems a bit strange that the plugin resides in a location that has been labeled as removed and does not correspond to your actual website address: 608767.REMOVED.com . It could be the security feature that deferred the address

    If the plugin was impacted by the firewall to stop accessing your real website address that’s what may cause the error when trying to activate it. In this case, you need to fully remove it and reinstall it again. When removing the plugin, make sure you also access your files on the web server and check the wp-content/plugins folder so that the plugin is not there before you proceed to install a fresh copy.

    Since you have WP Rocket the steps should be:

    1. Delete the plugin from the WP Admin dashboard
    2. Clear cache in WP Rocket
    3. Check if the folder of the plugin has been fully deleted from wp-content/plugins
    4. Install a fresh copy of the plugin
    5. Clear cache in WP Rocket

      Hope this resolves the issue of activating the plugin!
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin took site down after a week or so’ is closed to new replies.