【问题标题】:Where to set PHP_FCGI_MAX_REQUESTS value? DUBLICATE在哪里设置 PHP_FCGI_MAX_REQUESTS 值?复制
【发布时间】:2018-08-25 07:56:25
【问题描述】:

我找不到可以更改PHP_FCGI_MAX_REQUESTS 值的conf 文件的位置。 系统信息:Debian、php7、FAST-CGI、Apache 2.4、Plesk Onyx 17。

网上有类似的问题,包括stackoverflow,但没有一个答案给出文件目录。

我需要使用它来解决错误(32)Broken pipe..mod_fcgid: ap_pass_brigade failed in handle_request_ipc function,因为很多人建议将它设置为FcgidMaxRequestsPerProcess 的10 倍。

【问题讨论】:

    标签: php apache apache2 fastcgi plesk


    【解决方案1】:

    对于所有安装了 Plesk 的基于 Debian 的操作系统,将其添加到 /etc/apache2/mods-available/fcgid.conf 文件中的 IfModule mod_fcgid.c 块内:

    # tail -n 5 /etc/apache2/mods-available/fcgid.conf
      FcgidInitialEnv RAILS_ENV production
      FcgidIdleScanInterval 10
      FcgidMaxRequestsPerProcess 500
    
    </IfModule>
    

    不要忘记重启或重新加载服务:

    # service apache2 graceful
    [ ok ] Reloading web server config: apache2.
    

    【讨论】:

    • 当我在FcgidMaxRequestsPerProcess 500 之后添加PHP_FCGI_MAX_REQUESTS 时出现此错误:错误:Reloading web server: apache2 failed! Output of config test was: AH00526: Syntax error on line 26 of /etc/apache2/mods-enabled/fcgid.conf: Invalid command 'PHP_FCGI_MAX_REQUESTS', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information. The apache2 configtest failed. Not doing anything. ... (warning).
    猜你喜欢
    • 1970-01-01
    • 2014-08-24
    • 1970-01-01
    • 1970-01-01
    • 2016-10-07
    • 1970-01-01
    • 1970-01-01
    • 2013-05-18
    • 2019-04-02
    相关资源
    最近更新 更多