Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.5.2 - Unable to upload more than 3 PNG files at once using PHP GD Library #8173

Closed
africanforest opened this issue Oct 3, 2019 · 9 comments
Labels
Affects:Content Creators Affects those who use the UI to create or edit content. Bug Priority:Low This would be a nice fix, but it mildly improves things that already work. Product Areas:File Manager Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Bug Existing functionality not performing as expected.

Comments

@africanforest
Copy link

When trying to upload more than 3 PNG files at once, the upload process stops after 3 files.

To reproduce:

Open the file manager
Klick "Upload Files"
Drag more than 5 PNG files (50-200 kb) into the upload window

Expected behavior:

  • All 5 files are getting uploaded one by one, after having finished, the label of the button "Cancel" turns to "Close", clicking on it closes the window.

  • The popup confirmation window "Upload Complete" appears.

  • After closing that window, the uploaded 5 files are listed in the file manager.

Current behavior:

  • After dragging the files into the upload window, only the first 3 of them are getting uploaded, then the upload process stops. The upload window remains open, nothing happens.

  • After closing the upload window by clicking the X, four warnings are popping up, saying "Upload canceled".

  • The "Upload Complete" window appears, saying "1 file uploaded".

  • After closing that window by clicking the X, the file manager becomes visible again and the spinner turns for quite a while.

  • Finally, only 3 files are listed in the file manager.

@hostco
Copy link

hostco commented Oct 3, 2019

I just tested and I am not able to reproduce this behavior.

If you just upgraded to 8.5.2 try clearing the c5 cache as well as your browser cache and test again.

@africanforest
Copy link
Author

5.8.2, clean install, Elemental theme.
I cleared the cache, as well as the browser cache.
Now I was able to upload 4 of 5 files, which took ages and then the upload process stopped again.

I tested this on 3 other different 8.5.2 installations (caches cleared), but the upload worked only on one installation. (While the upload also took a very long time, considering the relatively small file sizes).

That issue occurs only with PNG files, upload of mulitple JPEG files by drag&drop works fine.

png_upload_fails_02
png_upload_fails_01

@hostco
Copy link

hostco commented Oct 3, 2019

I can confirm that I am seeing the slow uploading after the first 2 files. After the first 2 files there is a pause of at least 20-30 seconds then uploads continue.

Is it possible that your upload is timing out?

What do you have max_execution_time set to?

I have tested this with both gd and imagick and I am seeing the same results with both.

@hostco
Copy link

hostco commented Oct 3, 2019

After further testing its taking around 5 minutes to upload 5 png files that are all small in size using "upload files".

Drag and drop to the file manager window appears to be 2 minutes faster.

Screen Shot 2019-10-03 at 10 59 12 AM

@hostco
Copy link

hostco commented Oct 3, 2019

After looking a little further I can see that the account is running out of memory during the upload.

@africanforest
Copy link
Author

This is an extremely long time for uploading such small files.
I tried again to upload 7 PNGs of different dimensions and file sizes between 24 KB and 166 KB. Here are the used files as ZIP archive and a video of the upload process. Please be patient, the video takes 1.5 minutes.

upload_7_png_files

7_png_files.zip

@c5dragon
Copy link

c5dragon commented Oct 4, 2019

I also encountered this behaviour in the previous version (8.5.1) but without the error message popups. Never noticed this before because I never had to upload a bunch of png's at once.
(As I mentioned on slack).

ImageMagick can handle this better. I guess this upload fail has something to do with generating thumbnails?

@africanforest
Copy link
Author

Further investigations have shown that the problem with uploading PNGs only occurs when using the GD library, and never with ImageMagick.

The timeout always happens with GD, no matter how the images are uploaded: by drag&drop into the upload window, by drag&drop directly into the file manager window or via incoming directory.

When using Image Magick, all three upload variants work without problems and in a reasonable time, no matter how many files are uploaded at once.

Btw, in both cases (GD or ImageMagick) it makes no difference whether the synchronous or the asynchronous method is used to generate the preview images.

timeout_GD

@africanforest africanforest changed the title 8.5.2 - Unable to upload more than 3 PNG files at once 8.5.2 - Unable to upload more than 3 PNG files at once using PHP GD Library Oct 10, 2019
@aembler aembler added priority:like to have Type:Bug Existing functionality not performing as expected. labels Oct 28, 2019
@aembler aembler added Affects:Content Creators Affects those who use the UI to create or edit content. Bug Priority:Low This would be a nice fix, but it mildly improves things that already work. Product Areas:File Manager Status:Available Reviewed issue, it’s real, we’d review a pull request. and removed Recategorize:Priority labels Jan 8, 2020
@aembler
Copy link
Member

aembler commented Feb 17, 2022

Thankfully, this has been fixed for awhile at this point. Closing this issue.

@aembler aembler closed this as completed Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects:Content Creators Affects those who use the UI to create or edit content. Bug Priority:Low This would be a nice fix, but it mildly improves things that already work. Product Areas:File Manager Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Bug Existing functionality not performing as expected.
Projects
None yet
Development

No branches or pull requests

4 participants