cancel
Showing results for 
Search instead for 
Did you mean: 

Max execution time

Max execution time

Hello everyone.

Apologies for the dumb question.

 

Is there any expert on production environment that could please tell me what is considered an acceptable value for php's max_execution_time on a production server ?

 

Is max_execution_time = 60 an acceptable value or should I expect it to be lower?

 

 

Kind regards,

Angelo

6 REPLIES

Re: Max execution time

As long as the server is properly tuned, you shouldn't have any problem in setting the max_execution_time to a very high value (in the thousands).
James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: Max execution time

Thank you for your reply.

Although, I found it deeply shocking.

 

Necessarily, there have to be Varnish, and CDNs in front of Magento 2.

But if the request passes through, you let scripts run for more than 60 seconds?

 

Do you really consider normal on a frontend server to let more than 60 seconds for a page to generate?

 

O.o

 

 

Kind regards,

Angelo Maragna

 

Re: Max execution time

Hi @Angelo Maragna

 

As per my experience with magento 2 with multiple production deployments !!

 

max_execution_time should be in thousands and specifically it should be - 18000

 

this my opinion and suggestion based on the experience/issue which i faced.

if issue solved,Click Kudos & Accept as Solution

Re: Max execution time

Thank you for the answer @ManthanDave Smiley Happy

 

I acknowledge even you have situations where the server is let to run and run for ages.

I am looking for someone with experience where they configured it to run in less than 60 seconds.

 

I can not afford to have pages that generates in more than 30 seconds.

 

Kind regards,

Angelo Maragna

 

Re: Max execution time

You should set connection timeout at the web server level to mitigate that while keeping max_execution_time in the thousands.
James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips

Re: Max execution time

So you are suggesting it's normal to return an error to the user, and hang the server if a bunch of processes hangs.

 

Thanks to the configuration of a hosting provider (which, to be fare, I won't mention but is a British one whose initial is S), a low processing time on Magento 1 prevented my previous employer from an outage on the service. A miscoding was causing processes to loop indefinitely.

With a long execution time you saturate server resources.

 

If you go for a cheap hosting, ok. Long execution time, and when it happens it happens. You're on a budget, option accepted.

 

I prefer to go with a powerful server, low computing time, quick response, and good caching in front of it.

Also, if you pay more, your response time lowers, you get better ranking on Google, m so more customers and the new hosting pays out itself.

 

It's fundamentally wrong configure a frontend server with a long php execution time but I came to realize is a common need of Magento 2.

 

 

I would like to see if someone else can provide their experience of a low execution time.

 

Your answer is appreciated @JLHC Smiley Happy

 

 

Kind regards,

Angelo Maragna