also try increase max_execution_time and max_input_time.
This sets the maximum time in seconds a script is allowed to parse input data, like
"POST and GET". Timing begins at the moment PHP is invoked at the server and ends when execution begins. The default setting is -1, which means that max_execution_time is used instead. Set to 0 to allow unlimited time.
If the max_execution_time exceeds, then there is an explicit error message that the max_execution_time has been exceeded.