The impact of internet speed on PHP / MySQL execution

In Wordpress, my client creates large galleries (300 +/- images) and uses the Wordpress downloader to reorder images. It can be a file name, or numbers can be applied and sorted in ascending / descending order, etc.

He has terrible internet connection speed, and when he makes changes in the order of the files, they will not execute correctly - the images will be reordered, but not in the way he indicated. If I do this for him in my Internet connection, it works more or less accurately - 95% of the images are reordered, which is not bad considering the number (I told him to use smaller galleries!).

I am new to interacting with scripts and databases, but it seems to me that due to its poor connection, not enough data has been sent before the server completes the request and executes it. If this assumption were correct, how could I extend the period of time that the server allows this query to be executed using the PHP or MySQL configuration?

+4
source share
1 answer

Yes. You can change max_execution_time to PHP.ini. The default value is 30 seconds , so that any request for longer than 30 seconds will be terminated.

This mainly happens when you try to download a file from PHP, and the uploader download speed is rather low, so it exceeds the execution time. PHP will stop and the image will be corrupted.

There are various ways to change this value. This question has answers regarding alternatives; Increase maximum runtime for php

In addition, saving 350 images in one gallery is too large. Use pagination.

+1
source

All Articles