2

I've been having some out of memory issues. Pretty much there after tuning Apache but I have noticed something odd when analyzing memory usage. php-fpm is running in the background when, as far as I am aware, it has no use when running mod_php. I've had a good google but can't find anything on the subject.

Running Apache/2.2.22 ob Ubuntu 12.04, with mod_php (PHP Version: 5.3.10-1ubuntu3.9 with Suhosin-Patch)

As I understand it, php-fpm has nothing to do with mod_php, so why is it installed (I didn't explicitly install it myself), why is it running in the background, and is there a way I can disable it (and is it safe to do so)?

Here is an except from top

670 mysql     20   0  721m  50m 7728 S  0.0 10.3   0:08.95 /usr/sbin/mysqld
6486 www-data  20   0  310m  34m 3512 S  0.0  7.1   0:00.30 /usr/sbin/apache2 -k start
6489 www-data  20   0  287m  12m 3832 S  0.0  2.4   0:00.03 /usr/sbin/apache2 -k start
6474 root      20   0  284m  11m 6040 S  0.0  2.4   0:00.16 /usr/sbin/apache2 -k start
6484 www-data  20   0  286m  10m 3296 S  0.0  2.2   0:00.02 /usr/sbin/apache2 -k start
692 root      20   0  240m 5332 1560 S  0.0  1.1   0:01.24 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
1086 root      20   0 92556 5108 3088 S  0.0  1.0   0:07.36 sshd: root@notty
695 www-data  20   0  240m 4492  716 S  0.0  0.9   0:00.00 php-fpm: pool www
696 www-data  20   0  240m 4492  716 S  0.0  0.9   0:00.00 php-fpm: pool www
693 www-data  20   0  240m 4488  716 S  0.0  0.9   0:00.00 php-fpm: pool www
694 www-data  20   0  240m 4488  716 S  0.0  0.9   0:00.00 php-fpm: pool www

Admittedly, they are not taking up a huge amount of RAM (collectively ~5%), but I would rather free that up if I can...

I have confirmed I am running mod_php, phpinfo says: Apache 2.0 Handler /etc/php5/apache2/php.ini

If you need any further info, please let me know.

Manolo
  • 512
  • 2
  • 8
  • 22
Chris B
  • 23
  • 1
  • 4

1 Answers1

0

You can try:

apt-get remove php5-fpm

and see if it tells about any other packages that depend on it. This command also removes the package from the system.

If you don't want to remove the package, you can disable it with:

update-rc.d disable php5-fpm
Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
  • Nothing comes up as dependent, so safe to remove? Annoying, I tried this earlier but with php-fpm, facepalm. Thanks for your help! – Chris B Mar 13 '14 at 23:50