WordPress.org

Ready to get started?Download WordPress

Forums

EWWW Image Optimizer
[resolved] Breaks on Bulk Optimize (12 posts)

  1. Mrsonord
    Member
    Posted 8 months ago #

    'Process Interupted' for no apparent reason on 22 of 121 images.

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

  2. nosilver4u
    Member
    Plugin Author

    Posted 8 months ago #

    Can you post a link to the image it stalls on?

  3. nosilver4u
    Member
    Plugin Author

    Posted 8 months ago #

    I should have mentioned that it is most likely due to a large image that takes too long to optimize. This can be particularly problematic on a shared hosting server where they might kill long-running processes.

  4. Martin
    Member
    Posted 8 months ago #

    Getting this on latest version as well.
    Is it a php.ini type of setting thing?

  5. nosilver4u
    Member
    Plugin Author

    Posted 8 months ago #

    No, it is usually due to really large png files and/or custom monitors that some webhosts have in place to keep an eye on long-running processes. Otherwise, the bulk process rarely ever stalls anymore. I've had it run for hours without interruption on servers where the max_execution_time was still set to the default 30 seconds.

    The reason it is possible to run so long, is that php does not include any time spent running external commands via exec(), plus the fact that each image is run in a separate process via ajax, so it is actually controlled by your browser, not the server. The only other possibility is if you are losing connectivity to your server briefly, and your browser misses something with the ajax, but errors of that nature would be very random and sporadic.

  6. Martin
    Member
    Posted 8 months ago #

    Odd thing is the bulk optimise runs without issue on 2 other sites on the same VPS but my main site fails now.
    Wonder if it's a plugin conflict then? Hmmm

  7. nosilver4u
    Member
    Plugin Author

    Posted 8 months ago #

    Does it stall out on a particular image, or after a certain amount of time?
    I suppose it is possible that another plugin could cause an issue, but that seems odd, since the bulk optimize is driven by the browser on the client side.
    You may be able to use the chrome developer console, or firebug for firefox to see what actual error is being thrown by the process.

  8. Martin
    Member
    Posted 8 months ago #

    weird - here's Firebug:

    POST http://www.geekandjock.com/wp-admin/admin-ajax.php
    
    200 OK
    		2.16s
    jquery...=1.10.2 (line 5)
    HeadersPostResponseHTMLCookies
    
    <p>Optimizing&nbsp;<img src='http://www.geekandjock.com/wp-content/plugins/ewww-image-optimizer/wpspin.gif' alt='loading'/></p>
    
    POST http://www.geekandjock.com/wp-admin/admin-ajax.php
    
    200 OK
    		4.64s
    jquery...=1.10.2 (line 5)
    HeadersPostResponseHTMLCookies
    
    <p>Optimizing <b>2013/11/honesty-needs-trust-from-the-other-person.jpg</b>&nbsp;<img src='http://www.geekandjock.com/wp-content/plugins/ewww-image-optimizer/wpspin.gif' alt='loading'/></p>
    
    POST http://www.geekandjock.com/wp-admin/admin-ajax.php
    
    502 Bad Gateway
    		4.84s
    jquery...=1.10.2 (line 5)
    HeadersPostResponseHTMLCookies
    
    <html>
    <head><title>502 Bad Gateway</title></head>
    <body bgcolor="white">
    <center><h1>502 Bad Gateway</h1></center>
    <hr><center>nginx</center>
    </body>
    </html>
    
    "NetworkError: 502 Bad Gateway - http://www.geekandjock.com/wp-admin/admin-ajax.php"

    Can't say I've had an issue with admin-ajax.php before but maybe I have

  9. nosilver4u
    Member
    Plugin Author

    Posted 8 months ago #

    Hmm, those are nginx errors usually. Check /var/log/nginx/error.log for any messages.

  10. Martin
    Member
    Posted 8 months ago #

    It actually turns out to be the pm.max_requests setting in my PHPFPM's http://www.conf config.
    It's description of "The number of requests each child process should execute before respawning. This can be useful to work around memory leaks in 3rd party libraries."

    Once changed back to 0 for unlimited, EWWW is now merrily 400/1200 bulk optimising so it seems to have been a limitation on PHP.
    I have smiles again :)

  11. nosilver4u
    Member
    Plugin Author

    Posted 8 months ago #

    glad to hear you figured it out.

  12. Martin
    Member
    Posted 8 months ago #

    I might be slow and old but I am persistent haha

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.