<br>При переключении fastcgi с tcp коннекта (fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;) на сокеты (fastcgi_pass unix:/tmp/php-fpm.sock;) и появилась проблема... При загрузке файлов иногда (!) стала выдаваться 413 ошибка... в логах получаем следующее:<br>
<br>2010/06/27 10:55:50 [error] 44923#0: *309634 upstream timed out (60: Operation timed out) while sending request to upstream, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/save/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
2010/06/27 11:06:49 [error] 44922#0: *310300 upstream timed out (60: Operation timed out) while sending request to upstream, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/saveTracks/?id=1261 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
2010/06/27 11:06:49 [error] 44922#0: *310300 client intended to send too large body: 8364210 bytes, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/saveTracks/?id=1261 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
2010/06/27 11:07:59 [error] 44923#0: *310370 upstream timed out (60: Operation timed out) while sending request to upstream, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/saveTracks/?id=1261 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
2010/06/27 11:07:59 [error] 44923#0: *310370 client intended to send too large body: 1318466 bytes, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/saveTracks/?id=1261 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
2010/06/27 11:09:04 [error] 44923#0: *310467 upstream timed out (60: Operation timed out) while sending request to upstream, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/saveTracks/?id=1261 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
2010/06/27 11:09:04 [error] 44923#0: *310467 client intended to send too large body: 8791573 bytes, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/saveTracks/?id=1261 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
2010/06/27 11:10:31 [error] 44923#0: *310572 upstream timed out (60: Operation timed out) while sending request to upstream, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/saveTracks/?id=1261 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
2010/06/27 11:10:31 [error] 44923#0: *310572 client intended to send too large body: 14275204 bytes, client: 111.77.222.111, server: <a href="http://domain.ru">domain.ru</a>, request: "POST /main/saveTracks/?id=1261 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "<a href="http://domain.ru">domain.ru</a>"<br>
<br><br>Срабатывает, по всей видимости, emergency_restart_interval php-fpm'а.(?) Переключая обратно, получаем отлично работающий механизм. Что делать и куда копать уже не знаю, перерыл за две недели много, всё обновлял до последних версий и переставлял заново - эффект нулевой...<br>
<br>из конфига php-fpm:<br>.......<br><section name="global_options"><br><value name="pid_file">/var/run/php-fpm.pid</value><br><value name="error_log">/var/log/php-fpm.log</value><br>
<value name="log_level">notice</value><br><value name="emergency_restart_threshold">10</value><br><value name="emergency_restart_interval">1m</value><br><value name="process_control_timeout">5s</value><br>
<value name="daemonize">yes</value><br></section><br><br><workers><br><section name="pool"><br><value name="name">default</value><br><value name="listen_address">/tmp/php-fpm.sock</value><br>
<value name="listen_options"><br><value name="backlog">-1</value><br><value name="owner">www</value><br><value name="group">www</value><br>
<value name="mode">0666</value><br></value><br><br>Additional php.ini defines, specific to this pool of workers.<br><value name="php_defines"><br><!-- <value name="sendmail_path">/usr/sbin/sendmail -t -i</value> --><br>
<!-- <value name="display_errors">0</value> --><br></value><br><value name="user">www</value><br><value name="group">www</value><br><value name="pm"><br>
..........<br><br><br>из nginx'а:<br>......<br>location ~ \.php$ {<br>try_files $uri $uri/ =404;<br>client_max_body_size 50m;<br>client_body_timeout 3m;<br>fastcgi_pass unix:/tmp/php-fpm.sock;<br>fastcgi_index index.php;<br>
fastcgi_ignore_client_abort on;<br>fastcgi_param SCRIPT_FILENAME /home/www/<a href="http://domain.ru">domain.ru</a>$fastcgi_script_name;<br>fastcgi_param COUNTRY $country;<br>include fastcgi_params;<br>}<br>.....<br><br>С уважением,<br>
Андрей Рубцов<br>