I am running a php script on a website that creates thumbnails from a big image. The script uses imagick to generates 10 thumbnails per image.
It runs on first page load, when the thumbnails don't exist yet and can potentially be asked to generate hundreds of thumbnails on first page load. This takes time (about 2.5 seconds per batch of 10 thumbnails) and therefore the server returns a 504 Gateway Timeout error.
This error means:
The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI... [ source ]
Which I can understand as the php script can be running for 60 seconds or more.
My question is : does this mean that the script has crashed the server and that it has stoppped during it's execution?
Or does this just mean that my browser is to impatient to wait for the server response?
My main concern is that the script craches during the thumbnail generation and can potentialy generate corrupted files.