Title: Breaks on Bulk Optimize
Last modified: August 21, 2016

---

# Breaks on Bulk Optimize

 *  Resolved [Mrsonord](https://wordpress.org/support/users/mrsonord/)
 * (@mrsonord)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/)
 * ‘Process Interupted’ for no apparent reason on 22 of 121 images.
 * [http://wordpress.org/plugins/ewww-image-optimizer/](http://wordpress.org/plugins/ewww-image-optimizer/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289185)
 * Can you post a link to the image it stalls on?
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289344)
 * 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.
 *  [Martin](https://wordpress.org/support/users/rastarr/)
 * (@rastarr)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289499)
 * Getting this on latest version as well.
    Is it a php.ini type of setting thing?
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289500)
 * 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.
 *  [Martin](https://wordpress.org/support/users/rastarr/)
 * (@rastarr)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289501)
 * 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
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289502)
 * 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.
 *  [Martin](https://wordpress.org/support/users/rastarr/)
 * (@rastarr)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289504)
 * 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
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289505)
 * Hmm, those are nginx errors usually. Check /var/log/nginx/error.log for any messages.
 *  [Martin](https://wordpress.org/support/users/rastarr/)
 * (@rastarr)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289511)
 * It actually turns out to be the pm.max_requests setting in my PHPFPM’s [http://www.conf](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 🙂
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289512)
 * glad to hear you figured it out.
 *  [Martin](https://wordpress.org/support/users/rastarr/)
 * (@rastarr)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289513)
 * I might be slow and old but I am persistent haha

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Breaks on Bulk Optimize’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [Martin](https://wordpress.org/support/users/rastarr/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/breaks-on-bulk-optimize/#post-4289513)
 * Status: resolved