Major Image Processing/Uploading Issues

Our C/A instance is nearly ready to launch but we've been experiencing a lot issues with uploading media if it's any larger than a few KB (such as PDFs or quality JPEGs). Currently we are using Imagick.

Initially, we were getting a timeout or CSRF token error when uploading media. I had our IT team fix that error.

However, instead of getting the error CA will say "Image saved" but nothing will have happened. Batch imports initially start but eventually choke and stop. We followed guidance and suggestions from other support threads to change the tmp folders, etc. but we're still experiencing the same issues with the added issue that batch imports will not even begin despite the tmp folders filling up with large amounts of data (32GB). Using the UI to upload media results in "image saved" albeit with no media.

We were using Gmagick/Graphicsmagick priorm which had it's own issues. Namely files will are only recognized as binary and display the document placeholder icon instead of a thumbnail/media. So the thought of falling back to this (since it seems to be the preferred processor) present just as many issues.

Unfortunately, due to the pandemic I was laid off and I've only been granted a week or two to come back and try and get this project wrapped up. Any help or suggestions would be greatly appreciated.

Comments

  • What version of Gmagick and GraphicsMagick were you using? And what version of CA are you running? Changes made to recent versions of GraphicsMagick break support. There are patches in current CA versions to get around this.

    Also, when you save and nothing happens, is any media record created? Or just nothing at all?

  • Seth,

    Thanks for the speedy response!

    Our versions are as follows:


    Collective Access: version 1.7.8

    GraphicsMagick-1.3.36:

    gmagick-2.0.6RC1:

    Imagmagick: 6.7.8-9


    Insofar as the save, I've included a screenshot. No media record is created when saving through the UI.


    Thanks again for the assistance.

  • Ok, first thing to do would be to revert to GraphicsMagick but with 1.7.11 installed... or at the very least copy the following two files over from 1.7.11:

    app/lib/Plugins/media/Gmagick.php

    app/lib/Parsers/TilepicParser.php

    This should resolve your GraphicsMagick problems, which began in GraphicsMagick 1.3.33 (the Gmagick setResourceLimit() function broke with that release). If it doesn't let me know...

  • Okay, so I have replaced the recommended files over from providence 1.7.11 (unfortunately my IT team is not available to update the instance and I have limited access for "security" purposes, so it was the one thing I could try) and switched back to using Gmagick.

    Unfortunately, media is still displaying as binary (see screenshot) and if the files are a little larger than ~1MB it is still saying "Saved changes to image" without actually uploading the media.

  • Hmm, well maybe you didn't copy over the code that's actually being used?

    Regarding the 1mb file limit, did your IT staff the PHP upload_max_filesize and post_max_size settings to suitably large values? These two PHP server-side settings govern how large uploaded files can be. If they exceed the limit they'll be ignored and you'll get the behavior you describe. The default limit is 2mb (still quite low). If you can post the contents of your system configuration check screen (Under Manage > Administrate > Maintenance) we might get an idea if that's the issue.

  • I fully replaced the files you suggested with the ones from 1.7.11. I can have the IT team try and figure out how/when to fully upgrade if you think it would help resolve things. Though I'm not sure how long that may take (we haven't updated the system since the initial install).

    I had the IT staff up the upload_max_filesize a number of times thinking that was the issue. It seems that things are working, as the tmp directories are being filled, but sadly nothing ends up coming out. Currently they are:

    upload_max_filesize= 4900M (on our test instance) and 4900000M (on production)

    post_max_size=5000M

    I'm hoping attaching a PDF will work here in the forum. The first configuration screen is our test instance (running Gmagick) and the other one is the production site.

  • Don't set it that high. Some versions of PHP will ignore values about 4096M. Set it to 2000M to be safe and see how that goes...

  • edited May 5

    Lowered it to 2000M and sadly it's still behaving the same. Either saying "changes saved to [object type]" with no attached media or displaying a "CSRF Token is not valid" error. An image around 7MB will upload (which is good) but PDFs or anything a skosh larger will return the error and batch import media won't initiate.

  • Are you sure these are actually set and that the server is picking up the new values? If possible run phpinfo() within a page and check the output to confirm the settings PHP is loading are what you think they are.

Sign In or Register to comment.