I have a .php-file that I run four times a day with a cron job. The .php-file goes thru multiple pages searching for a certain text. And it needs a lot of time to get it’s job done.
When I run the script I get a “500 Internal Server Error”.
Where can I increase the maximum time for the script to get run? I think it hits the roof for taking to long time and then I get the “500 Internal Server Error”.
I have changed the following in $HOME/etc/php.ini:
max_execution_time = 900 ; Original 60 Maximum execution time of each script, in seconds
max_input_time = 900 ; Original 60 Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 700M ; Original 128M Maximum amount of memory a script may consume (128MB)
It was the following line in the path way: Webmin > Servers > Apache Webserver > “Pick your Virtual Server, and click Virtual Server infront” > “Click Change Directives” > “Find the following line and increase”:
IPCCommTimeout
Is original set to 31 (which means 31 seconds) increase this.