rosell-dk / webp-express

Wordpress plugin for serving autogenerated WebP images instead of jpeg/png to browsers that supports WebP
GNU General Public License v3.0
221 stars 63 forks source link

Bulk convert makes PHP-FPM crash #607

Open jacob-rh opened 2 months ago

jacob-rh commented 2 months ago

Hi there,

We're trying to run bulk convert / convert on upload for a site running PHP-FPM and it regularly causes PHP to crash.

I have to restart PHP-FPM service for the site to come back.

Logs say: 18-Jun-2024 14:26:52] NOTICE: [pool www] child 2289644 started [18-Jun-2024 14:27:03] WARNING: [pool www] child 2288025, script '/var/www/html/staging/wp-admin/admin-ajax.php' (request: "POST /wp-admin/admin-ajax.php") executing too slow (11.334608 sec), logging [18-Jun-2024 14:27:03] NOTICE: child 2288025 stopped for tracing [18-Jun-2024 14:27:03] NOTICE: about to trace 2288025 [18-Jun-2024 14:27:03] NOTICE: finished trace of 2288025 [18-Jun-2024 14:27:18] NOTICE: Terminating ... [18-Jun-2024 14:27:18] NOTICE: exiting, bye-bye!

Server details:

Any ideas what might be causing this? Never noticed it happening before on sites with the same config.

Cheers.

nisbet-hubbard commented 1 month ago

httpd and php-fpm can definitely be configured to handle the load of bulk convert. The major constraint is how much RAM you’ve got.

The following resources can help you figure out the optimal settings for your machine:

https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM

https://bz.apache.org/bugzilla/show_bug.cgi?id=53555#c39

https://www.liquidweb.com/blog/apache-performance-tuning-mpm-directives/

https://devcenter.heroku.com/articles/php-concurrency