Welcome! Log In Create A New Profile

Advanced

nginx + spawn fcgi + php cgi без apache

October 16, 2009 02:51PM
помогите, уже несколько дней мучаюсь.

с nginx все в порядке, а вот со скриптом запуска fcgi php что-то не так.
Проблема: PHP_FCGI_MAX_REQUESTS ставлю допустим 10
и через 10 подключений процесс php-cgi пропадает
(а я так понял, что он должен перезапускаться!)

Система: debian 5
nginx 0.7.62

Скрипт запуска spawn-fcgi
[code]
#!/bin/bash
PHP_SCRIPT=/usr/bin/php-fastcgi
RETVAL=0
case "$1" in
start)
$PHP_SCRIPT
RETVAL=$?
;;
stop)
killall -9 php5-cgi
RETVAL=$?
;;
restart)
killall -9 php5-cgi
$PHP_SCRIPT
RETVAL=$?
;;
*)
echo "Usage: php-fastcgi {start|stop|restart}"
exit 1
;;
esac
exit $RETVAL
[/code]

Скрипт spawn-fcgi:
[code]
#!/bin/sh
#PHP_FCGI_CHILDREN=5
#export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=10
export PHP_FCGI_MAX_REQUESTS
/usr/bin/spawn-fcgi -s /tmp/fcgisock-1 -u user1 -g web -U web -G web -f /usr/bin/php5-cgi
/usr/bin/spawn-fcgi -s /tmp/fcgisock-2 -u user2 -g web -U web -G web -f /usr/bin/php5-cgi
[/code]
Subject Author Posted

nginx + spawn fcgi + php cgi без apache

Alien85 October 16, 2009 02:51PM

Re: nginx + spawn fcgi + php cgi без apache

noonesshadow October 16, 2009 05:22PM

Re: nginx + spawn fcgi + php cgi без apache

Alien85 October 18, 2009 01:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready