Showing results for 
Search instead for 
Did you mean: 

Magento 2.2.2 - Maximum execution time of 300 seconds exceeded


Magento 2.2.2 - Maximum execution time of 300 seconds exceeded

I am upgrading a website from Magento 2.2 to 2.5 and running into an error. I read through a lot of threads and forums but nothing is working. This includes adding 

max_execution_time 60000, set_time_limit(0) in my php.ini


I am using Cloudways and they said any PHP directives defined in a .htaccess will not be used. To use PHP-FPM Settings. 


I added the following values:

Screen Shot 2018-08-06 at 4.01.38 PM.png

I restarted my server and looked into my phpinfo() and saw the changes I made were the same values in the image attached. 



  1. Running Magento 2.2.2, upgrading to 2.2.5
  2. I have 1 website 1 store 4 store views. Over 250k orders and about 400 products.

Steps to reproduce

  1. composer require magento/product-community-edition 2.2.5 --no-update
  2. composer update
  3. rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
  4. php bin/magento setup:upgrade

Expected result

  1. The Magento 2.2.2 upgrades to 2.2.5.

Actual result

  1. Time to upgrade takes longer than 300 seconds.
  2. Maximum execution time of 300 seconds exceeded in /home/
    work/ObjectManager/Factory/AbstractFactory.php on line 111


Thanks for reading. Anything helps!