• Resolved comicscorner

    (@comicscorner)


    Hi.

    after installing the pluggin the site became very slow and the cpu usage go to 100%

    this the php error log:

    PHP Fatal error: Uncaught Error: Class ‘DOMDocument’ not found in /var/www/html/wp-content/plugins/wp-asset-clean-up/classes/OptimiseAssets/MinifyCss.php:114\nStack trace:\n#0 /var/www/html/wp-content/plugins/wp-asset-clean-up/classes/OptimiseAssets/OptimizeCss.php(437): WpAssetCleanUp\\OptimiseAssets\\MinifyCss::minifyInlineStyleTags(‘\\n<!doctype html…’)\n#1 /var/www/html/wp-content/plugins/wp-asset-clean-up/classes/OptimiseAssets/OptimizeCommon.php(178): WpAssetCleanUp\\OptimiseAssets\\OptimizeCss::alterHtmlSource(‘\\n<!doctype html…’)\n#2 /var/www/html/wp-content/plugins/wp-asset-clean-up/classes/OptimiseAssets/OptimizeCommon.php(138): WpAssetCleanUp\\OptimiseAssets\\OptimizeCommon::alterHtmlSource(‘\\n<!doctype html…’)\n#3 [internal function]: WpAssetCleanUp\\OptimiseAssets\\OptimizeCommon::WpAssetCleanUp\\OptimiseAssets\\{closure}(‘\\n<!doctype html…’, 9)\n#4 /var/www/html/wp-includes/functions.php(4552): ob_end_flush()\n#5 /var/www/html/wp-includes/class-wp-hook.php(288): wp_ob_end_flush_all(”)\n#6 /var/www/html/wp-includes/class-w in /var/www/html/wp-content/plugins/wp-asset-clean-up/classes/OptimiseAssets/MinifyCss.php on line 114

    can you give me some help?

    thx

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @comicscorner thanks for letting me know about this and my apologies for this inconvenience. Is this error recorded only once when you load a page or several times? It looks like you’re not having the DOMDocument extension enabled in php.ini. It should be on by default when PHP was setup by your hosting company. Or, perhaps a developer worked on your website and deactivate it (which is quite unlikely, but you never know).

    The file /classes/OptimiseAssets/MinifyCss.php is not verifying if the extension is enabled (other files check if the extension is ON to avoid errors like that). I’ll update the plugin to make sure the check if in place in case DOMDocument is not active. Thanks for reporting this as other people could have this issue too.

    Let me know if you can enable DOMDocument extension. Perhaps, contacting the hosting company to do it for you would be a good idea if you don’t have full access to the server (e.g. it’s a shared hosting environment) or you’re just not comfortable doing it yourself.

    Thread Starter comicscorner

    (@comicscorner)

    Hi Gabe,
    thank you for the fast reply 🙂
    i’ve enabled DOMDocument on server, now i get no php error, but, with pluggin activated, cpu still goes 100% and the pages take a lot for load (most of the time they go in timeout), any suggestion?

    thx

    Plugin Author Gabe Livan

    (@gabelivan)

    @comicscorner The error_log file is likely containing the information I need as any errors caused by the plugin will be reported there. So, please go to (plugin’s menu) “Tools” – “Debugging” and use the blue button to download the error log (if any found). If you can’t see any, please access your cPanel or whatever control panel you’re using to view the latest PHP errors. Or, even easier, setup “Error Log Monitor” plugin. It will record and show in the Dashboard (in a widget) the recorded PHP errors. It’s good to have it in case you will get other errors from various plugins or the theme, not just from Asset CleanUp.

    Thread Starter comicscorner

    (@comicscorner)

    Hi Gabe

    this is the error i get from log (tested with pluggin active, not in test mode, loading a random category page)

    [02-Apr-2020 04:06:33 UTC] PHP Fatal error: Maximum execution time of 360 seconds exceeded in /var/www/html/wp-content/plugins/wp-asset-clean-up/vendor/matthiasmullie/minify/src/Minify.php on line 361
    [02-Apr-2020 04:06:33 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0

    thanks you

    Plugin Author Gabe Livan

    (@gabelivan)

    @comicscorner that explains it! The error you’re getting is related to the fact that you likely have very large CSS/JS files and you do not have a CPU powerful enough to deal with it (nothing wrong here as some big unoptimised files can take a long time to optimise, despite having a good hosting package). If you check the changes made to the latest version, 1.3.6.1, there are mentions about making less calls to the minify library to use less calls: https://ww.wp.xz.cn/plugins/wp-asset-clean-up/#developers

    If updating to the latest version, still doesn’t fix this, it’s likely that more optimisation is needed on your end OR you have a very large file there that is causing this. If that’s the case, please send me your “System Info” from “Tools” (plugin’s menu), and I will be glad to check it out. Other users might be in the same situation.

    Let me know the outcome you get after updating to the latest version of the plugin! Happy testing!

    Thread Starter comicscorner

    (@comicscorner)

    Hi Gabe
    sorry for the slow reply
    i’ve finally have the time to make some test

    after the last patch all seems to works fine
    thank you a lot

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘page not loading and huge cpu usage’ is closed to new replies.