Super slow upload startup for large image

When uploading multiple very large images (> 20mb per image), the upload UI gets stuck for several minutes before the progress bars start to move.

Here are four of them which are enough to show the effect. I tried it on two different servers with Kirby v3 and also on a old Kirby v2 setup which showed the same effect.

In my local environment it also get’s stuck but only very briefly.

I’d actually like to queue 48 of those large images at once. And even larger versions (tiff, >80mb).

The php memory limits are all quite high, so that shouldn’t be the issue:

post_max_size = 256M
upload_max_filesize = 256M
memory_limit = 512M

When I check the network traffic it looks like the panel is waiting for a server response while it’s stuck.

post_max_size should be greater tha the upload_max_filesize. The post contains the uploaded file, along with other data, so should be a few megabytes larger atleast.

Whats the reason for such large images? Its worth noting that you dont have to use the panel to upload them, you can do it directly via SSH or SFTP. For parts of my large site, i resorted to writtting an upload hook that unpacks a zip file contain several images.

Im not completely sure how the batch upload works - Ive got feeling that if the combined weight of all the files is greater then the upload size, then it will struggle. I could be wrong there.

If I get you right, the files are finally all uploaded, only it takes a long time before anything happens in the Panel?

Kirby uploads the files and then copies them over to the media folder and generates the thumbs for the Panel.

If the ini settings were not sufficient, the files would probably not get uploaded in the end. :thinking:

Which thumb driver are you using?

What is max_execution_time set to?

It’s for an image pool. I know that I can upload them via SSH and SFTP and that’s also what I did in the end. Since the content will be handled by my less tech-savvy client, I expect that uploading those large files should work in the panel.

Yes, eventually it works. But my client canceled the upload because they didn’t get a visual response for a long time.

I tested it on two servers – one using GD, the other using IM.

On the GD server it’s 240, on the IM server 600.

It does all that before the progress bar starts to grow?

This is what I observe:

  1. Post request with the images is getting sent to /files (no visual feedback)
  2. Long waiting time
  3. Images are getting loaded from the server (I think this is when the progress bar starts to grow)