• Resolved igortitarenko

    (@igortitarenko)


    Hello,

    I’m trying to bulk-optimize images, but displayed progress is always 0%.

    Error is returned in the Console:

    POST https://example.com/wp-admin/admin-ajax.php
    Status 500 Internal Server Error

    Request:

    action “shortpixel_image_processing”
    queues “media,custom”

    Associated NGINX log:

    247866 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to a member function handleOptimizedFileType() on null in /public/wp-content/plugins/shortpixel-image-optimiser/class/Model/Image/MediaLibraryModel.php:522
    Stack trace:

    0 /public/wp-content/plugins/shortpixel-image-optimiser/class/Controller/OptimizeController.php(611): ShortPixel\Model\Image\MediaLibraryModel->handleOptimized()

    1 /public/wp-content/plugins/shortpixel-image-optimiser/class/Controller/OptimizeController.php(409): ShortPixel\Controller\OptimizeController->handleAPIResult()

    2 /public/wp-content/plugins/shortpixel-image-optimiser/class/Controller/OptimizeController.php(374): ShortPixel\Controller\OptimizeController->runTick()

    3 /public/wp-content/plugins/shortpixel-image-optimiser/class/Controller/AjaxController.php(168): ShortPixel\Controller” while reading response header from upstream, client: 194.36.25.38, server: example.com, request: “POST /wp-admin/admin-ajax.php HTTP/2.0”, upstream: “fastcgi://unix:/var/lock/php-fpm-7.4-sftp_web_wiso3vi9:”, host: “”, referrer: “https://example.com/wp-content/plugins/shortpixel-image-optimiser/res/js/shortpixel-worker.js”



Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Pedro

    (@petredobrescu)

    Hello @igortitarenko and thanks for reporting this.

    The error is a bit odd because it could show up when a specific thumbnail is somehow sent for optimization, but without being present in the WordPress metadata. But that’s how our plugin builds the list of images to sent for optimization, so it’s surely very odd.

    In order to debug this further, we need a bit more details from you:

    • can you please send us the list of active plugins and the active theme? Ideally, we could use the entire debug information found in Tools -> Site Health -> Info
    • can you check the console and look above the error you mentioned? You should see which image was send for optimization and then check to see if there is anything weird going on with that image (is it a missing image, or does it have more or less thumbnails than it should, etc.?).

    We’ll do our best to reproduce the same error on our test sites. Any additional information that you can send us would be really helpful!

    Thank you!

    Thread Starter igortitarenko

    (@igortitarenko)

    Hi @petredobrescu

    I cannot see in the Console which image is sent for optimization.

    POST https://example.com/wp-admin/admin-ajax.php[HTTP/2 500 Internal Server Error 656ms]

    Worker.js reporting issue [object Response] shortpixel-worker.js:104:15

    Error without item – 500 Internal Server Error(undefined) screen-bulk.js:637:12

    updating Data : error

    Object { message: “<div class=\”\”>500 Internal Server Error(undefined)</div>” } undefined screen-bulk.js:526:15

    Error: 500 Internal Server Error shortpixel-processor.js:573:19

    Stop Processing #242 shortpixel-processor.js:246:17

    Shutting down Worker

    Themes: Name Jupiter (jupiter2) Version 6.10.1

    Plugins:

    Asset CleanUp: Page Speed Booster Version 1.3.8.9 by Gabe Livan | Auto-updates disabled
    Classic Editor Version 1.6.2 by WordPress Contributors | Auto-updates enabled
    Easy Table of Contents Version 2.0.41 by Magazine3 | Auto-updates enabled
    ECO Custom Version 1.0 | Auto-updates disabled
    Fixed Widget Version 6.2.3 by Thomas Maier, Max Bond | Auto-updates enabled
    FormCraft Version 3.2.23 by nCrafts | Auto-updates enabled
    Jupiter Core Version 1.0.4 by Artbees | Auto-updates enabled
    Jupiter Donut Version 1.4.2 by Artbees | Auto-updates enabled
    MC4WP: Mailchimp for WordPress Version 4.8.12 by ibericode | Auto-updates enabled
    Post Slider For Visual Composer Version 1.1 by Nasir | Auto-updates enabled
    Redirection Version 5.3.6 by John Godley | Auto-updates enabled
    ShortPixel Image Optimizer Version 5.1.6 by ShortPixel | Auto-updates enabled
    TablePress Version 2.0.2 by Tobias B?thge | Auto-updates enabled
    Thrive Architect Version 2.6.10 by Thrive Themes (Latest version: 3.16.2) | Auto-updates enabled
    W3 Total Cache Version 2.2.9 by BoldGrid | Auto-updates enabled
    Wordfence Security Version 7.8.2 by Wordfence | Auto-updates enabled
    WP-Sweep Version 1.1.5 by Lester ‘GaMerZ’ Chan | Auto-updates enabled
    WPBakery Page Builder (Modified Version) Version 6.10.0 by Michael M – WPBakery.com | Auto-updates enabled
    WPML Multilingual CMS Version 4.5.14 by OnTheGoSystems | Auto-updates enabled
    Yoast SEO Version 19.13 by Team Yoast | Auto-updates enabled

    Thread Starter igortitarenko

    (@igortitarenko)

    Right. So, I went into the plugin options, cleared the queue and started bulk optimization again. It works for now.

    Plugin Author Pedro

    (@petredobrescu)

    Thanks for the details @igortitarenko.

    I see that you are also using WPML, but without the Media Translation extension plugin. Are you uploading all images to the same language? Because without the WPML Media plugin, all sort of situations may appear.

    I’m glad the bulk is running now. However, if there’s an image with some issues, there’s a high change that it will get stuck again.

    I’ll mark the ticket as Resolved for now and please let us know if the error comes back!

    Thread Starter igortitarenko

    (@igortitarenko)

    @petredobrescu Could you please elaborate on “all sort of situations may appear”? Is it related to WPML alone or to ShortPixel combined with WMPL?

    Plugin Author Pedro

    (@petredobrescu)

    We’ve seen many situations when things became at least weird when WPML was used, mostly from what’s stored in the DB perspective. And looking at the error you reported, there is a change that it is related to WPML, especially if you had operations like restoring from the backup, re-optimizing, while WPML was turned off. Or even image optimizations done with and without WPML active.

    Please tell me if you’re still getting that error or the bulk finished successfully this time.

    Thanks!

    Thread Starter igortitarenko

    (@igortitarenko)

    I’m not getting that error anymore and the bulk was finished successfully this time.

    Plugin Author Pedro

    (@petredobrescu)

    That’s great news @igortitarenko, thanks for the confirmation!

    We have actually been able to identify a potential cause of this error and it shows up only in certain situations (most likely when there are multiple PNG file processed more or less at the same time and they also have thumbnails that are not listed in the WordPress metadata).

    We’ll include a permanent fix for this in the upcoming version 5.2.0.

    Please let us know if you have any other questions!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘500 error during bulk optimization’ is closed to new replies.