Support » Plugin: EWWW Image Optimizer » Scan did not complete, will try again

  • Resolved Vova P.

    (@vpadalko)


    Hello!
    I’ve just installed you plugins EWWWW, and try to do first scan, but after few seconds I see such error message:
    Scan did not complete, will try again

    I’ve tried to restart scan few times, but there is the same results.
    So, please support me. Why it’s happened?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    How many images do you have in your media library?

    Thread Starter Vova P.

    (@vpadalko)

    There are 266 images.

    Hello,

    I have the same problem/message in a multi-site install. Few months ago the plugin worked perfect… what happened?

    Please help.

    BR,

    • This reply was modified 4 years, 3 months ago by lingenChan.
    Plugin Author nosilver4u

    (@nosilver4u)

    @lingenchan, the Bulk tool was completely rewritten a while back, there have been various issues that I’ve fixed, but if you are on 3.2.4, apparently we are still missing something. Since Vova started the thread, I will be addressing their questions, but feel free to follow along, and contribute any ideas or info you find in the process.

    @vpadalko, the main issues before were memory-related, but on your site with 266 images, that is highly unlikely to be the problem.

    The place to start is to see what is happening behind the scenes, and the best way to do that is with the Firebug extension: https://www.youtube.com/watch?v=V4U2hQlmkvQ

    If we just see something like “500 Server Error” that isn’t very helpful, but it at least tells us there is an error somewhere that needs to be fixed.

    If instead we see some sort of output with an error in it, that helps tremendously.

    Another important thing to watch for when using Firebug, is how long it takes for the AJAX request. Does it die within a few seconds, or does it take 30+ seconds?

    More things we can try:
    1. Look at the error logs on the server for anything related to EWWW. If you don’t have access, check with your webhost or server admin to see if they can check the logs for you.
    2. In your wp-config.php file, enable the WP_DEBUG constant, and try it again, also looking at the AJAX responses to see if we get some useful output. And of course, you can then look at #1 again, or ask your webhost to check them too.

    Ok, so that’s a lot of info, lets see what you folks can come up with!

    Hi,

    yes, i’m in the version 3.2.4 because it is the last one as far as I could see.

    On Firebug console there’s an: {“error”:”Access denied.”} together with a “Access denied” message beside the image, when I try to manually re-optimize a single image from the media library.

    And when I try to “Bulk optimize” the library I receive a “500 internal server error” in the console together with a message in red font: “Scan did not complete, will try again” and after few seconds “Operation timed out, you may need to increase the max_execution_time for PHP”.

    As far as I know my max_execution_time for PHP is far enough: 180

    BR,

    • This reply was modified 4 years, 3 months ago by lingenChan.

    If I can chip in: I had the same issue w/ 700 images in the library. I shortly deactivated all my plugins (except EWWW) for the duration of the scan, just to see if it made a difference. I still had the ‘Scan did not complete, will try again‘ error, but in the end it did succeed in scanning the Media Library and allowed me to continue.

    Plugin Author nosilver4u

    (@nosilver4u)

    @lingenchan, please enabled WP_DEBUG in your wp-config.php and see if it shows more detail on the bulk requests than just a 500 server error. As for the single image attempts, please contact me here: https://ewww.io/contact-us/ as that is a separate issue and I’d like to dig into it a bit more if we can without getting sidetracked on this thread.

    @somtijds, that is indeed what it should do if the scan is able to partially complete each time, but dies in the middle for some reason. What I’m struggling with is that the scanner in 3.2.4 now checks after every 100 images to make sure it has both enough memory remaining, and has not taken longer than 15 seconds, which is well under any PHP timeouts I’ve ever seen. Yet it seems that it still dies without returning proper results in some configurations. The fact that it can’t complete 100 images in each attempt is a bit staggering to me. Granted, I don’t host anywhere that doesn’t use SSDs, but I can do thousands of images in 15 seconds, so I figured 100 was a pretty safe threshold.

    Plugin Author nosilver4u

    (@nosilver4u)

    Ok, so I’ve been thinking on this a bit more, and I want to see if we are still fighting memory issues. Can someone (or everyone) please increase your memory_limit within PHP to at least double what it is currently, and see if that resolves the issues?
    If you aren’t sure of how to change that, check with your webhost for instructions, usually you can modify it via cpanel, but some webhosts may have to do it manually (or may not even allow it).

    Plugin Author nosilver4u

    (@nosilver4u)

    Just cracked this nut (or one similar) on a site. The issue was with an attachment that had failed to process completely when it was first uploaded (it was a huge PNG file). This results in EWWW attempting to rebuild the metadata (and WP attempts to rebuild the thumbs). I’m not sure if it was a memory constraint, but for whatever reason it failed every time as soon as it hit that image. Removing the unused PNG from the media library fixed the issue.

    To that end, I’ve uploaded a version of the plugin with some increased logging capability here: https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip

    If anyone and everyone who is having this issue could do some testing with this version, I’d appreciate it. To do so:

    1. Delete the current version of EWWW
    2. Upload the one from the link using the built-in WP plugin uploader (don’t try to upload it via FTP, although SFTP should work fine).
    3. Turn on EWWW’s debugging setting.
    4. If you had debugging on previously, see the link near the debug information on the settings page where you can remove the debug.log file, and use the to clear the log.
    5. Run a bulk scan. As soon as it says something like “scan did not complete”, refresh the page, so that it does not continue trying to scan.
    6. Download the new debug.log file from the settings page, and send it to me via https://ewww.io/contact-us/

    @nosilver4u: I’ve sent you a debug file (ran Bulk Optimize with all plugins active this time), hope you can make out what’s happening! Let me know if you need anymore additional info.

    Plugin Author nosilver4u

    (@nosilver4u)

    The debug log from @somtijds confirmed the same exact issue. I have an idea to workaround it, so I’m going to be working on that today.

    Still would be good to know if the other folks on this thread are having the same issue, or something else.

    Plugin Author nosilver4u

    (@nosilver4u)

    Ok, try this update: https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip

    Things to watch for — please confirm that you see this behavior and feel free to provide feedback:
    1. When a broken attachment kills the scan, the error message will display a spinner to help emphasize that the scan is still ongoing.
    2. The next scan attempt should skip the broken attachment, and display a message indicating that resizes for the broken attachment were skipped. It is still possible for EWWW to queue the full-size image with broken metadata, but not resizes/thumbnails.
    3. There is a counter for each failure, and now a successful request resets the counter. If there are 10 failures in a row, the scan will terminate with the message about timeouts and such.

    Plugin Author nosilver4u

    (@nosilver4u)

    Fixed a typo in the js on dev, should be working properly now, and I was able to spin up a centos 6 virtual machine, and it worked properly there. My local box with PHP7 wouldn’t throw 500 server errors no matter how low I cranked the memory (all the way down to 8MB).

    Still would appreciate confirmation from a few other folks before I release the fix on Monday.

    Plugin Author nosilver4u

    (@nosilver4u)

    Just released 3.2.5, shoot me an email if it still isn’t working for you: https://ewww.io/contact-us/

    It still throws the error, but marches on nicely. Thanks for moving this forward so quickly!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Scan did not complete, will try again’ is closed to new replies.