Memory leaks on nginx / php-fpm

hi guys,

i have a serious problem that i can’t make nor heads nor tails of. i am
using nginx 1.0.6 with php 5.2.17 + fpm.

i run a gallery2 image gallery, pretty busy, and when i redirected some
traffic from the old server today to the new one, i got a bunch of
memory leaks messages in the php-fpm log. they are going like crazy
filling up the log.

can you please give me some advice?

thanks in advance.

Sep 11 01:24:29.948540 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr:
“/usr/ports/lang/php52/work/php-5.2.17/Zend/zend_variables.c(131) :
Actual location (location was relayed)”
Sep 11 01:24:29.948583 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr: “Last leak repeated 2 times”
Sep 11 01:24:29.948591 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr: “[Sun Sep 11 01:24:29 2011]
Script: ‘/home/cityv3/public_html/gallery/main.php’”
Sep 11 01:24:29.948597 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr:
“/usr/ports/lang/php52/work/php-5.2.17/Zend/zend_variables.c(132) :
Freeing 0x80C269680 (512 bytes),
script=/home/cityv3/public_html/gallery/main.php”
Sep 11 01:24:29.948603 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr:
“/usr/ports/lang/php52/work/php-5.2.17/Zend/zend_alloc.c(2391) : Actual
location (location was relayed)”
Sep 11 01:24:29.948637 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr: “Last leak repeated 2 times”
Sep 11 01:24:29.948644 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr: “[Sun Sep 11 01:24:29 2011]
Script: ‘/home/cityv3/public_html/gallery/main.php’”
Sep 11 01:24:29.948650 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr:
“/usr/ports/lang/php52/work/php-5.2.17/Zend/zend_vm_execute.h(7535) :
Freeing 0x80C26CF78 (24 bytes),
script=/home/cityv3/public_html/gallery/main.php”
Sep 11 01:24:29.948693 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr: “[Sun Sep 11 01:24:29 2011]
Script: ‘/home/cityv3/public_html/gallery/main.php’”
Sep 11 01:24:29.948699 [WARNING] fpm_stdio_child_said(), line 167: child
22682 (pool default) said into stderr:
“/usr/ports/lang/php52/work/php-5.2.17/ext/standard/string.c(756) :
Freeing 0x80C26D270 (6 bytes),
script=/home/cityv3/public_html/gallery/main.php”

You will want to bring this up to the PHP people as there is no link
between Nginx and PHP-FPM. There is a fastcgi abstraction layer between
them. That said, they have deprecated PHP 5.2.x and PHP-FPM for 5.2.x is
a patch so I honestly think you’ll be told to upgrade first and then see
what happens, so you might want to do that first.

Posted at Nginx Forum:

fixed by disabling the apc extension. i have no clue how that got
installed as i did not build it. it was conflicting with the installed
eaccelerator. weird stuff.

FYI: last version of APC (3.1.9) fixed some memory leaks with FastCGI,
I have no issues with php-fpm 5.3.8 and APC 3.1.9

another recomendation - switch to PHP 5.3 if you can, 5.2 branch is not
supported anymore, and php-fpm SAPI is now bundled into main PHP (5.3),
works fine, just pay attention that config file is not XML anymore.

Posted at Nginx Forum: