Troubleshooting guide

PHP-FPM High Memory Usage: What to Check Before Increasing Limits

Troubleshoot PHP-FPM high memory usage, worker settings, WordPress plugins, slow scripts, memory limits and server capacity.

Remote support availableCommercial systemsService: PHP-FPM Support
PHP-FPMmemory usageWordPressWooCommerceLinux

What this problem usually means

PHP-FPM can use too much memory when the pool allows too many workers, individual requests are heavy, or application code/plugins consume more RAM than expected. Increasing limits without sizing the pool can cause swapping and outages.

Production caution: Do not simply raise PHP memory_limit or max_children on a small server. That can make the site crash harder when traffic increases.

Common symptoms

  • Server RAM fills during traffic spikes
  • 502/504 errors appear under load
  • PHP-FPM processes consume large memory each
  • Swap usage increases and the site slows down
  • WordPress or WooCommerce becomes unstable

Common causes

  • pm.max_children is too high for available RAM
  • Heavy plugins, themes or long-running PHP jobs
  • PHP memory_limit set high across many workers
  • Slow external API calls keeping workers busy
  • No object cache or inefficient database queries
  • Traffic spikes from bots or crawlers

Safe first checks

These checks are intended to help identify the direction of the issue. Always adjust paths, service names and commands for your environment.

Show PHP-FPM processes

ps -ylC php-fpm* --sort:rss | tail

Check pool config

grep -R "pm.max_children\|memory_limit" /etc/php/*/fpm/ -n

Check memory pressure

free -m && vmstat 1 5

Review slow logs if enabled

grep -R "slowlog\|request_slowlog_timeout" /etc/php/*/fpm/pool.d/ -n

Typical fixes

  • Calculate safe PHP-FPM worker count from real memory usage
  • Use ondemand or dynamic process management where appropriate
  • Enable and review PHP-FPM slow logs
  • Reduce plugin/theme load and background jobs
  • Add Redis/object caching where useful
  • Block abusive bot traffic at NGINX or Cloudflare

When to get help

Get help if the system is production-facing, customer data is involved, backups are uncertain, or the issue affects revenue, security or uptime. We can review the logs, confirm the cause and quote a fixed-scope fix where appropriate.

Need this fixed?

Get remote support for this issue.

Fixed technical support starts from $499. Emergency incident support is $199/hr with a minimum window.

Contact Us

Related guides