Skip to content

Technology Forum

SEO, Speed Up website, Server Optimization, Linux, Open Source Softwares

  • Home
  • General
    • Web Server
    • Website Formatting
  • IT Companies
  • Optimization
    • PHP
  • Linux
  • Home
  • General
  • Web Server
  • PHP FPM modification – Plesk
Web Server
Security Tips
MySQL
Calculate Query Cache
Servers
SMTP reply codes
PHP
TIPS
PHP
WordPress Optimization
Plesk Panel
Plesk: Disable Nginx and Rebuild Httpd Configuration

PHP FPM modification – Plesk

Posted on May 10, 2024April 27, 2025 By admin No Comments on PHP FPM modification – Plesk
Web Server

Search max_children erros in PHP Log – error.log

grep -r “server reached max_children setting” /var/log/*php*-fpm/error.log | cut -d’ ‘ -f5 | tr -d ‘]’ | sort | uniq -c | sort -nr

Plesk check PHP: pm.max_children for varioius websites

find /opt/plesk/php/ -type f -name “*.conf” -exec grep –color -Hni “pm.max_children =” {} \;

Make cron to modify PHP: max_children for php-fpm

ln -s /usr/local/sbin/mod_php_ini /etc/cron.hourly/
chmod +x /usr/local/sbin/mod_php_ini
cat /usr/local/sbin/mod_php_ini

MODIFIED=
[ -d /etc/php ] && find /etc/php/ -type f -name “*.conf” -exec grep -il “pm.max_children = 5$” {} \; | xargs sed -i “s/pm.max_children = 5$/pm.max_children = 50/g” 2>/dev/null && MODIFIED=true
[ -d /etc/php5 ] && find /etc/php5/ -type f -name “*.conf” -exec grep -il “pm.max_children = 5$” {} \; | xargs sed -i “s/pm.max_children = 5$/pm.max_children = 50/g” 2>/dev/null && MODIFIED=true
find /opt/plesk/php/ -type f -name “*.conf” -exec grep -il “pm.max_children = 5$” {} \; | xargs sed -i “s/pm.max_children = 5$/pm.max_children = 50/g” 2>/dev/null && MODIFIED=true

 

if [ ${MODIFIED} ] ; then
/etc/init.d/plesk-php71-fpm restart
/etc/init.d/plesk-php70-fpm restart
/etc/init.d/plesk-php56-fpm restart
fi

Tags: FastCGI Process Manager PHP php-fpm Plesk

Post navigation

❮ Previous Post: HTML: Link rel – Preload

You may also like

Web Server
HTTP header and Server Response Codes
PHP
Apache Prefork versus Worker
Optimization
Add Trailing Slash to URL (.htaccess)
Web Server
Security Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

View Posts

  • PHP FPM modification – Plesk
  • HTML: Link rel – Preload
  • HTML: Attributes of rel
  • Linux Commands
  • Security HTTP Headers

Categories

  • Domain Name
  • General
    • Servers
    • Web Server
    • Website Formatting
  • IT Companies
  • Linux
  • MySQL
  • Optimization
    • PHP
  • Troubleshooting
  • Web Hosting Control Panel
    • Plesk Panel
  • Websites
    • CSS
    • HTML
    • Optimization
  • Windows
    • Windows 10

Recent Posts

  • PHP FPM modification – Plesk
  • HTML: Link rel – Preload
  • HTML: Attributes of rel
  • Linux Commands
  • Security HTTP Headers

Copyright © 2025 Technology Forum.

Theme: Oceanly News by ScriptsTown