From:             
Operating system: Linux (funtoo/gentoo)
PHP version:      5.3.3
Package:          FPM related
Bug Type:         Bug
Bug description:Sending php-fpm service a HUP signal causes problems with 
daemontools

Description:
------------
I'm running php-fpm with DJB daemontools (daemonize = no) process
supervisor.



Every time I send the process a HUP signal (graceful reload) the process is
in some way "detached" from daemontools so it's not possible to reload it
because it's already runninng.



Since the children processes aren't properly (?) terminated, php-fpm
refuses to start:

Test script:
---------------
# ps axf

 1806 ?        Ss     0:00 /bin/sh /command/svscanboot

 1809 ?        S      0:02  \_ svscan /service

 1811 ?        S      0:00  |   \_ supervise nginx

 1861 ?        S      0:00  |   |   \_ nginx: master process
/usr/local/sbin/nginx -c /usr/local/etc/nginx/nginx.conf

 1947 ?        S      0:00  |   |       \_ nginx: worker process           
                       

 1812 ?        S      0:00  |   \_ supervise log

 1862 ?        S      0:00  |   |   \_ /command/multilog t s10000000 n30
/var/log/nginx

 1824 ?        S      0:00  |   \_ supervise php-fpm

20807 ?        Ss     0:00  |   |   \_ /usr/local/sbin/php-fpm --fpm-config
/usr/local/etc/php/php-fpm.conf

20808 ?        S      0:00  |   |       \_ /usr/local/sbin/php-fpm
--fpm-config /usr/local/etc/php/php-fpm.conf

20809 ?        S      0:00  |   |       \_ /usr/local/sbin/php-fpm
--fpm-config /usr/local/etc/php/php-fpm.conf

20810 ?        S      0:00  |   |       \_ /usr/local/sbin/php-fpm
--fpm-config /usr/local/etc/php/php-fpm.conf

 1825 ?        S      0:00  |   \_ supervise log



# svc -h /service/php-fpm

# ps axf

14606 ?        S      0:01 /srv/bin/php-cgi --fpm --fpm-config
/srv/etc/php/php-fpm.conf

14607 ?        S      0:00 /srv/bin/php-cgi --fpm --fpm-config
/srv/etc/php/php-fpm.conf

14608 ?        S      0:01 /srv/bin/php-cgi --fpm --fpm-config
/srv/etc/php/php-fpm.conf



# tailf /var/log/php-fpm/current 

@400000004cb81c1f223b929c Oct 15 06:17:09.545883 [ERROR] bind() for address
'127.0.0.1:9000' failed: Address already in use (98)

@400000004cb81c1f34789c0c Oct 15 06:17:09.880267 [WARNING] [pool www]
pm.start_servers is not set. It's been set to 3.

@400000004cb81c1f35767854 Oct 15 06:17:09.880736 [ERROR] bind() for address
'127.0.0.1:9000' failed: Address already in use (98)

@400000004cb81c203798141c Oct 15 06:17:10.932654 [WARNING] [pool www]
pm.start_servers is not set. It's been set to 3.




-- 
Edit bug report at http://bugs.php.net/bug.php?id=53074&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53074&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53074&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53074&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53074&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53074&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53074&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53074&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53074&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53074&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53074&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53074&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53074&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53074&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53074&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53074&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53074&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53074&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53074&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53074&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53074&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53074&r=mysqlcfg

Reply via email to