I want to create 1 Million coupon codes. What is the maximum no. of coupon codes I can generate at a time? I tried to generate 0.2 Million coupons at a time but it displays error like

maximum execution time reached

And I set unlimited execution time but no use.

Kindly help me.

  • After creating this amount of coupons did you notice a performance problem in your cart?
    – lloiacono
    Sep 29, 2017 at 11:27
  • @lloiacono i imported 6m coupons and my checkout page is now deadly slow.
    – Ashar Riaz
    Mar 26, 2019 at 12:47

1 Answer 1


It sounds like you reached the maximum execution time in PHP. You can update this by updating your PHP ini file setting. This can be done a number of ways depending on your PHP install. By default PHP sets this to 30 seconds. Magento provides a sample php.ini file which resets this to 300 minutes.

Update your php.ini file with the following:

max_execution_time = 18000

Or set it to 0 to be unlimited.




After you make these changes you should restart Apache/nginx and/or PHP-FPM. The changes to ini files will not take effect until after a restart of the services.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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