This can be solved:
set_time_limit(900);
This function specifies the maximum execution time of the current php script.
Although the setting value is 900 seconds, in fact
the maximum execution time = php. The max_execution_time value in ini - the time the current script has been executed + the setting value
If max_execution_time in php.ini = 30 and the current script has been executed for 10 seconds, then:
Maximum execution time = 30-10+900 =920 seconds.
After such modification, the PHP script successfully updated 200,000 records.
The above is passed in the LAPP environment.
In addition, it is said that this method is invalid in the windows environment. In the windows environment, you need to specify the max_execution_time value in php.ini.
This scenario has not been tested.