4

As to replicate pretty much as the poster in this thread - Magento 2.2 often extremely slow, 100% processor usage after setup:upgrade

I have now had to restore a Magento from overnight backup 3 times now. I am working to move to Magento 2.3 from Magento 1.9 but I get as far as installing few extensions and then suddenly Magento will start to slow and spawn loads of PHP processes and send the server load sky high. I went as far as removing every single extension I added that day and still the same. Restore database backup too, same issue. I cannot find a way without having to restore from a backup or a fresh install every time. I don't ever see how I will be able to run this in production environment if it keeps doing this...

I don't understand why it randomly does this.... I'm not an expert. I have ran every possible command and searched heavily for a fix for this issue to no avail.

  • were you on a developer mode ? – fmsthird Jan 31 at 12:16
  • please check app/etc/env.php 'MAGE_MODE' => 'default' or 'MAGE_MODE' => 'developer', – HIren Kadivar Jan 31 at 12:19
  • It made no difference which mode I was in. – Daniel Bates Jan 31 at 12:26
  • but in which mode are you now? – fmsthird Jan 31 at 12:27
  • 1
    I'm currently restoring a backup from last night to get back on track. I didn't expect such quick responses, so thank you. I am going to repeat extensions I was installing and if the issue arises again (as it seems to consistently) I will let you know. – Daniel Bates Jan 31 at 12:29
0

There are multiple resources available to improve Magento 2 performance and all of them are pretty well documented.

Mode: Magento 2 has introduced modes, being the default one the slowest. Give the developer mode a try and always run your live store in production mode. More info here.

0

There are different ways for speeding up your Magento site. However, the very first thing that you should do is running the developer mode.

You can also try using Varnish Cache. Follow these steps:

  1. Install and configure Varnish Cache.
  2. Head to Stores > Configuration > Advanced > System > Full Page Cache.
  3. Select Varnish Cache in Caching Application.

In addition, you can try activating CSS/JS minification and enabling flat categories and products. You can find the steps right here.

0

Slow magento 2 is not because of installing new modules. Magento 2 is much heavier than magento 1.9. So you need to optimize it and do some process to speed up.

  • Disable useless extensions

    php bin/magento module:disable VendorName_PluginName

to re-enable it

php bin/magento module:enable VendorName_PluginName
  • Choose the fastest hosting that you can afford
  • Turn on cache
  • Turn on Production mode

    php bin/magento deploy:mode:show

  • Never Use JS Bundling in:

You can double check JS bundling is off by going to backend menu Stores > Configuration > Advanced > Developer:

  • Enable CSS/JS Minification
  • Use Built-in Cache or Varnish
  • We are talking up to 5 - 10 minutes to load a single page. I have just restored a backup and Magento runs perfectly fine, a single php process as expected. This does not explain the multiple processes it keeps running. – Daniel Bates Jan 31 at 12:50
  • Try newrelic, I had used it in my website, it describe you the piece of code where your queries taking time. And its free for 15 days, its a builtin feature of magento 2, you just need to register on newrelic and integrate on your website – Shoaib Munir Jan 31 at 12:52
0

Do you know much about your server setup? I've seen this happen on servers configured to use php-fpm and essentially there aren't enough workers configured.

This is the best explanation I can find.

https://stackoverflow.com/questions/39535926/how-php-fpm-manages-workers-with-dynamic-process-manager

Or maybe this

https://serverfault.com/questions/645755/differences-and-dis-advanages-between-fast-cgi-cgi-mod-php-suphp-php-fpm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.