• Resolved wypin

    (@wypin)


    Opening the shop page of WooCommerce takes tens of seconds to display.
    Query Monitor reports that EWWWIO is responsible for long running queries.

    EWWW Image Optimizer version 5.2.5 is installed besides WooCommerce 3.7.0.

    Some of those queries look like this:

    UPDATE wpyn_options
    SET option_value = 'a:2225:{i:0;a:3:{s:2:\"id\";s:5:\"85483\";s:3:\"new\";b:0;s:4:\"type\";s:10:\"image/jpeg\";}
    ...
    ', autoload = 'no'
    WHERE option_name = 'wp_ewwwio_media_optimize_batch_a'

    I’ve cut the option_value.
    And there are several of those.
    Those queries are HUGE, megabytes long in size.
    Look at: a:2225
    A PHP array of 2225 elements is updated into the option_value multiple times on every /shop request.
    It seems like that the queue isn’t cleared or something?

    Those aren’t even the long running queries, those are:

    SELECT option_value
    FROM wpyn_options
    WHERE option_name LIKE 'wp\\_ewwwio\\_media\\_optimize\\_batch\\_%'
    AND option_value != ''

    called by EWWWIO_Background_Process->count_queue().
    And:

    SELECT option_value
    FROM wpyn_options
    WHERE option_name LIKE '_transient_wp_ewwwio_media_optimize_process_lock'

    called by EWWWIO_Background_Process->is_queue_active().

    I even uninstalled the plugin, removed both MySQL tables and deleted every option WHERE option_name LIKE ‘%ewww%’.
    But the issue persisted after a couple of hundreds images were uploaded.

    • This topic was modified 6 years, 1 month ago by wypin.
Viewing 1 replies (of 1 total)
  • Plugin Author Shane Bishop

    (@nosilver4u)

    If you’re getting the queue building up while visiting the shop page, that means WooCommerce still has thumbnail regen bugs and you should report that to them. EWWW IO doesn’t do that on it’s own. The plugin is merely triggering on the wp_generate_attachment_metadata process that Woo is running.

    If you want to clear the queue, you can turn on debugging and go to Media->Image Queue Debugging, though the issue will persist as long as WooCommerce is regenerating thumbs when it doesn’t need to be (either that, or you cancelled a Woo thumbnail regen and now it’s just trying to do them on-demand).

    All that said, we are going to be reworking the async queue to use our new queue table that will be much more efficient. It’s actually the next thing on MY queue to do 🙂

    To summarize: If loading the exact same page of the WC shop keeps showing this behavior, there is a WC bug. If this is happening on various pages, then it’s very possible WC is just doing it’s “on-demand thumbnail regen” and it will stop once all your images are done. Or you could just install a thumbnail regen plugin and be done with it.

Viewing 1 replies (of 1 total)

The topic ‘A bug which kills the server performance’ is closed to new replies.