-
Notifications
You must be signed in to change notification settings - Fork 53
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
Uploads timing out with Advanced Image Compression enabled #150
Comments
It could definitely be legit timing out on ImageMagick if the machine is slow or the image is big enough. PHP and Apache both have memory limits and timeout limits for processing, so you may be hitting up against those. If you have control over the config, increasing those limits could help. |
Here is the error we get:
|
@nwtn do you think there are some settings we could come up with that would give us most of the image savings and require less memory? Like maybe we experiment with your settings minus optimizations, as you outlined in your Smashing Mag article. What do you think? |
Any update here @nwtn? |
Bump. |
Having the same problem, each time I try to upload an image I get an error in PHP log:
The uploader finally says "HTTP error" and after refresh I get a general icon in the media section: Cheers. |
Spent some time profiling uploads with these settings and it looks like the memory issues are related tot he posterization settings that are being applied. After looking back through @nwtn's old test data it looks like those settings really only benefit PNGs and can actually create slightly larger file sizes when applied to JPG images. Try commenting out this line in the
|
This removes the posterization filter from the advanced image compression settings to substantially reduce the CPU load which could cause image resizing to fail (see #150). After digging into the research @nwtn did to come up with these settings, it turns out that posterization only improves file sizes for PNGs and can actually lead to slightly larger file sizes for JPG images.
Running into an issue when uploading some image files:
No specific PHP error is thrown, but the upload times out calling
posterizeImage
in the ImageMagick extension. It also only seems to be happening on larger images—specifically larger than 1200x600. Any chance this rings a bell for anyone? @nwtn? I know PHP has a global timeout for transfers, but I’m guessingposterizeImage
being called means we’re past that point.Test images that reproduce the issue are at https://hbp.box.com/s/45r19c026sxtv8tcihhjw2ym0i3rlof8
cc @daigofuji
The text was updated successfully, but these errors were encountered: