I upload an excel file with 1000 rows, by default I have just 2 min in execution time, with that time I can upload 400 records. I get this error Maximum execution time of 120 seconds exceeded
How i can modify this period in yii2 framework ?
The easiest solution to this problem is increasing the time limit. Changing it to 300 seconds (5 minutes) is often more than enough. If that doesn't help, you can try setting even higher values for maximum execution time.
max_execution_time int. This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30 . When running PHP from the command line the default setting is 0 .
You need to change that in the php.ini:
max_execution_time = 500
or in your php script:
set_time_limit(500); //
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With