• Resolved Karastel

    (@karastel)


    First I want to thank you for a great plugin. It is really very good!

    I ran into a problem:
    When I click “scan and optimize” after ~ 5-10 seconds I get the message: “Operation timed out, you may need to increase the max_execution_time for PHP”.
    But my value max_execution_time = 150 (I checked)

    What could be wrong?


    I use EWWW Image Optimizer v.2.2.2

    https://wordpress.org/plugins/ewww-image-optimizer/

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter Karastel

    (@karastel)

    In the media library I have about 700 images. And the plugin optimizes them without problems.

    Plugin Author nosilver4u

    (@nosilver4u)

    The Media Library is a totally different scenario than the Scan & Optimize. All EWWW has to do is query the database for a list of attachment IDs, takes less than a second on most sites.

    The Scan & Optimize has to recursively scan each folder you’ve configured in Folders to Optimize, and check each image in the ewwwio_images table to see if it has been optimized already. Did it work with a folder that just had 1 image?

    Thread Starter Karastel

    (@karastel)

    No. I get this message “Allowed memory size of 268435456 bytes exhausted (tried to allocate 4294916270 bytes) in /…./wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php” for folder with 1 image.

    Plugin Author nosilver4u

    (@nosilver4u)

    Ok, we’re going to need to disable all plugins and try it again. If it works, re-enable plugins one at a time until you get the error again. I’m having a hard time believing that EWWW is trying to use 4 GB of memory all by itself.

    Thread Starter Karastel

    (@karastel)

    disabled all plugins – the same result

    Plugin Author nosilver4u

    (@nosilver4u)

    What if you switch to the default theme (either twenty fifteen or twenty fourteen)?

    Thread Starter Karastel

    (@karastel)

    Worked!
    Problem in my theme.
    What should look for in the first place?

    Plugin Author nosilver4u

    (@nosilver4u)

    Good question, I’m not quite sure without seeing it. Is it a free theme, paid theme, or a custom-built theme?

    Thread Starter Karastel

    (@karastel)

    I use this theme https://wordpress.org/themes/mantra/.
    I make some modifications to the theme. Therefore, for test I deleted my modification and downloaded the latest version of the theme. The problem remained.
    Something is wrong in the theme itself

    Plugin Author nosilver4u

    (@nosilver4u)

    Good to know, I’ll try to take a look at it this weekend, keep me posted if you find anything else in the meantime.

    Thread Starter Karastel

    (@karastel)

    Ok. Thank you.

    Plugin Author nosilver4u

    (@nosilver4u)

    Apparently some of the mimetype functions have trouble with .po files (or at least some of the ones in the Mantra theme. I’m going to add-in a pre-emptive check for .po files so it doesn’t even check the mimetype on them.

    The culprits were these:
    /var/www/wordpress/wp-content/themes/mantra/languages/da_DK.po
    /var/www/wordpress/wp-content/themes/mantra/languages/nl_NL.po
    /var/www/wordpress/wp-content/themes/mantra/languages/de_DE.po

    You can just delete them, as the .po files aren’t used by WordPress when a .mo file is available.

    Thread Starter Karastel

    (@karastel)

    Delete.
    Now “scan and optimize” working!

    THANK YOU VERY MUCH!
    Also thank you for amazing plugin!

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘max_execution_time instant error’ is closed to new replies.