I've script that can take very long time to complete. Inside a result server responds in 503 error. How do i set longer execution time?
During my PHP script I set:
Take a look at maximum_execution_time.
However to my understanding this usually must be occur the php.ini , on the brief consider the manual it states this ought to be settable by scripts otherwise in safe mode.
You do not know the precise error? Without them, my prediction may be the memory limit, perhaps you have transformed this too? Look at your php.ini:
memory_limit = 128M
Despite what time-limit you occur the script, an internet request might break earlier since the client surrenders, or because any proxy server in the centre surrenders, or even when the apache server is set up to stop.
Because the other answerer pointed out the
maximum_execution_time variable may help, but it might be better should you did not leave the customer waiting having a lengthy delay.
Get a pattern that shows feedback:
- User initiates action eg Publish request
This is much like PHP Background Processes. So read that Additionally,
First you have to alter the time period limit in php.ini you cannot change it in the script itself. Or perhaps in .htaccess using
Second, you might be you need to modify the way you communicate with user more friendly to ensure that the page uses an update you are able to explore ajax http-refresh multipart pages for various approaches. If you're doing lengthy information possibly you are able to launch them without anyone's knowledge increase a database, retrieve the outcomes later.