php-fpm não é possível reiniciar devido a outra instância do FPM

2
/etc/init.d/php-fpm restart
Stopping php-fpm:                                          [FAILED]
Starting php-fpm: [10-Oct-2013 21:24:37] ERROR: An another FPM instance seems to already listen on /home/php-fpm/sock/gosianozka.sock
[10-Oct-2013 21:24:37] ERROR: FPM initialization failed
                                                           [FAILED]

Acontece de tempos em tempos e não tenho a menor ideia de como corrigi-lo.

Estou usando o PHP 5.4.20 do ius repo no CentOS 6.4 de 64 bits.

PHP 5.4.20 (cli) (built: Sep 20 2013 10:06:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.4.3, Copyright (c) 2002-2013, by ionCube Ltd., and
    with SourceGuardian v9.5, Copyright (c) 2000-2013, by Inovica Ltd.
    with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

Meu script init.d:

#! /bin/sh
#
# chkconfig: - 84 16
# description:  PHP FastCGI Process Manager
# processname: php-fpm
# config: /etc/php-fpm.conf
# pidfile: /var/run/php-fpm/php-fpm.pid

# Standard LSB functions
#. /lib/lsb/init-functions

# Source function library.
. /etc/init.d/functions

# Check that networking is up.
. /etc/sysconfig/network

# Additional environment file
if [ -f /etc/sysconfig/php-fpm ]; then
      . /etc/sysconfig/php-fpm
fi

if [ "$NETWORKING" = "no" ]
then
    exit 0
fi

RETVAL=0
prog="php-fpm"
pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid}
lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}

start () {
    echo -n $"Starting $prog: "
    dir=$(dirname ${pidfile})
    [ -d $dir ] || mkdir $dir
    daemon --pidfile ${pidfile} php-fpm --daemonize
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch ${lockfile}
}
stop () {
    echo -n $"Stopping $prog: "
    killproc -p ${pidfile} php-fpm
    RETVAL=$?
    echo
    if [ $RETVAL -eq 0 ] ; then
        rm -f ${lockfile} ${pidfile}
    fi
}

restart () {
        stop
        start
}

reload () {
    echo -n $"Reloading $prog: "
    killproc -p ${pidfile} php-fpm -USR2
    RETVAL=$?
    echo
}


# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status -p ${pidfile} php-fpm
    RETVAL=$?
    ;;
  restart)
    restart
    ;;
  reload|force-reload)
    reload
    ;;
  condrestart|try-restart)
    [ -f ${lockfile} ] && restart || :
    ;;
  *)
    echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}"
    RETVAL=2
        ;;
esac

exit $RETVAL
    
por Spacedust 10.10.2013 / 21:27

1 resposta

1

Esse foi o bug do repositório da ius. Comutado para remi e tudo funciona bem!

    
por 14.10.2013 / 22:58