Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Language specific forums Russian (Русский) Веб сервер
  • Search

fastcgi и ошибка 500

Вопросы по работе Веб сервера
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
RaRa
Posts: 43
Joined: Mon Apr 20, 2015 11:31 pm

fastcgi и ошибка 500
  • Quote

Post by RaRa » Sat Mar 12, 2016 8:50 am

Здравствуйте!
Возникла проблема, решить которую не удаётся. Перерыл весь инет, всё перепробовал, а воз и ныне там. Помогите, кто может.
Суть: когда к серверу идёт пост запрос, который требует большого времени выполнения, после 30 секундного таймаута выскакивает ошибка 500.
В логах такие строки:
[fastcgi:error] *** FastCGI: comm with server "/home/admin/web/***/cgi-bin/php5-fcgi" aborted: idle timeout (30 sec), referer: http://***/
[fastcgi:error] *** FastCGI: incomplete headers (0 bytes) received from server "/home/admin/web/***/cgi-bin/php5-fcgi", referer: http://***/
Я увеличивал -idle-timeout, request_terminate_timeout, fastcgi_read_timeout и max_execution_time. После изменений перезагружал сервисы и всё бестолку. Как был 30 секундный таймаут, так и остался.
Конфигурация php-fpm + Nginx. Ubuntu 14.04
Где чего подкрутить?
Top

ChaosHead
Posts: 7
Joined: Thu Jan 14, 2016 11:03 am

Re: fastcgi и ошибка 500
  • Quote

Post by ChaosHead » Sat Mar 12, 2016 9:03 am

Special PHP considerations

By default, PHP FastCGI processes exit after handling 500 requests, and they may exit after this module has already connected to the application and sent the next request. When that occurs, an error will be logged and 500 Internal Server Error will be returned to the client. This PHP behavior can be disabled by setting PHP_FCGI_MAX_REQUESTS to 0, but that can be a problem if the PHP application leaks resources. Alternatively, PHP_FCGI_MAX_REQUESTS can be set to a much higher value than the default to reduce the frequency of this problem. FcgidMaxRequestsPerProcess can be set to a value less than or equal to PHP_FCGI_MAX_REQUESTS to resolve the problem.
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

FcgidMaxRequestsPerProcess должен быть ниже или одинаковым с PHP_FCGI_MAX_REQUESTS, чтобы в момент, когда значение достигает максимума, а процесс работает, у пользователя не появлялась ошибка 500.
Top

RaRa
Posts: 43
Joined: Mon Apr 20, 2015 11:31 pm

Re: fastcgi и ошибка 500
  • Quote

Post by RaRa » Sat Mar 12, 2016 9:37 am

FcgidMaxRequestsPerProcess должен быть ниже или одинаковым с PHP_FCGI_MAX_REQUESTS, чтобы в момент, когда значение достигает максимума, а процесс работает, у пользователя не появлялась ошибка 500.
Вы уверены, что дело в настройках количества запросов? В логах ведь чётко указано, что истёк 30 секундный таймаут, а не превышено допустимое количество запросов на процесс.
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Веб сервер”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password