php5-fpm trouble with nginx using 100% CPU

I have a client that has a website that I've moved over to DigitalOcean. Today, it started having trouble. The CPU started getting pegged with php5-fpm processes. I'm still trying to figure out what is going on.

  • The error log is located in /var/log/nginx/error.log
  • The configuration file is located at /etc/php5/fpm/pool.d/www.conf

I can reset the process with a sudo service php5-fpm restart but before too long, the php-fpm: pool www processes end up taking up 100% of the CPU.

There were some error messages in the errors.log file that indicated that memory may be an issue. I found an article recommending that I look in the php.ini file (locate php.ini from the command prompt). There were several files an the /etc/php5/cli/php.ini file had the setting of memory_limit = -1 which basically means "unlimited". I set that to be memory_limit = 128M and restarted. We'll see if that resolves the issue.

Well, these are my notes and hopefully I'll stumble upon a solution.