3

Is it safe to change max_execution_time to something like 300? Why magento 2 need this gigantic max_execution_time (18000 = 5 hours) first place?

3

Yes you can you need to increase execution time so that magento can interact with database easily. It required increment because magento also run many heavy task in background like: product import and export, backup creation, backup roll back and many more so in order to make all process smooth we increase execution time in php.ini file.

If this reply helpful please accept it as solution thanks.

  • This makes debugging very hard. I think, Lets say I have some infinite loop in my code which trigger at some random event. With this max_execution_time cpu rises up to 100% and stuck. – Dasun Sep 18 '18 at 16:00
  • Yes it make debugging hard but also see the positive part that it makes execution faster and won't occur run time error due to less memory provided. Now if i talk about infinite loop then its different thing the reason it consume 100% cpu and stuck because as we know that tasks are executed according to their priority and when our cpu encounter an infinite loop then it dedicate its full resources to that task and other task get into pending and our cpu get confused that which task it should execute next that is why it stuck.. Please accept it as solution if this reply is helpful thanks. – Shubham Khandelwal Sep 18 '18 at 16:12
  • I know why cpu consume 100%, max_execution_time there for to avoid such a incident. I think having this much execution time for each task is bad, They could've default set max_execution_time to something smaller and set exclusively high value when necessary. Anyway I accepted your answer – Dasun Sep 18 '18 at 18:55

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.