Max execution time hard limits?


#1

I have been trying to import a large file through Wordpress and no matter how high I change the settings below in my php.ini file (tried both PHP v5.3 or 5.4) the process appears to time out after about 4-5 minutes.

I’ve received conflicting information on max_execution_size. Some at Dreamhost have said you can set it as high as you’d like through PHP while others have said Dreamhost limits this to 4 minutes or something similar. It seems like the latter is true, but no one will confirm.

upload_max_filesize
post_max_size
max_execution_time
max_input_time


#2

The default max_execution_time is 30 seconds and max_input_time is -1 (no limit).
max_execution_time = -1

FastCGI processes will time out after 5 minutes. You might try setting the domain to use regular CGI to see if your webserver allows an extension on processing time. Note that PHP will try to store uploaded data in memory before writing the complete file to disk, so there is an insurmountable limit there, too.

At the end of the day, you shouldn’t be relying on WP (or PHP) to import large files.


#3

Hello,

I have the same problem.

What is the max_execution_time on Dreamhost dedicated ?

Can I use
max_execution_time = -1

But then my import will still be automatically stop after 5mns ?

“FastCGI processes will time out after 5 minutes. You might try setting the domain to use regular CGI to see if your webserver allows an extension on processing time. Note that PHP will try to store uploaded data in memory before writing the complete file to disk, so there is an insurmountable limit there, too.”

Thanks.


#4

If you are on a dedicated server you should have root access and be able to change execution time as you please.

Before you do that, consider the drawbacks of changing a default: your script may clog up the whole server. Also, a script that relies on non-standard PHP configurations may not be easily ported to another server. Consider re-architecting your solution before changing the defaults (sane defaults are there for good reasons, usually.)


#5

Hello,

I need to change the execution time only to allow some websites migration (import thousands pages/users/orders to a new shop). So I can put it back as it was after importing the data ?

I sent a Support ticket but maybe you could help me what are the commands to change the execution time on my dedicated ? I have already created a root user for this purpose.

Thank you.


#6

As root you on Dedicated have the power to do anything you want :slight_smile: I’ve never used a dedicated server at DreamHost, but I expect a php.ini file (or phprc, not sure what’s called) in /etc/php(something).

I found some documents that may give you some guidance on what you need to change in such file:


and of course, check http://php.net/manual/en/info.configuration.php

HTH


#7

I got a reply from Dreamhost admin and it is limited by the server.

If you are on dedicated you can change it or ask him to change it.


#8

Hello,

So it seems that the max_execution_time is set per user ?
Not for each domain or for the whole server ?

Thank you.