• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question How to change PHP_FCGI_MAX_REQUESTS value?

Ulugbek

New Pleskian
I cannot find the location of the conf file where I can change the value of PHP_FCGI_MAX_REQUESTS. Info about the system: Debian, php7, FAST-CGI, Apache 2.4, Plesk Onyx 17.

I need to use this in order to solve the error (32)Broken pipe..mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, as many people recommend to set it 10 times more than FcgidMaxRequestsPerProcess.
 
I do not have httpd folder in etc directory. Or did you mean /etc/apache2/mods-available/fcgid.conf? If yes, Should I just add inside <IfModule mod_fcgid.c> as other Fcgid configurations are written? Like "PHP_FCGI_MAX_REQUESTS 10000"? I have seen on the web that many others use the word "FcgidInitialEnv" in the same line before PHP_FCGI_MAX_REQUESTS? Is it the correct way of setting this configuration?
 
Sorry, that was a CentOS path. Yes, try adding it right before the last </IfModule>
 
"FcgidInitialEnv" does not influence the Fcgid process settings like "FcgidMaxProcesses", "FcgidMaxProcessePerClass", "FcgidIdleTimeout" and so on. The "FcigInitialEnv" is a command that makes the variables that are listed behind it available to the Fcgid process that is using the FastCGI interface. You do not need to preceed the Fcgid configuration variables by it.
 
I got this error when I add PHP_FCGI_MAX_REQUESTS after FcgidMaxRequestsPerProcess 500. Error: 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).
 
I think this is partly related to your previous question about Fcgiinitialenv. As far as I remember, when the directive is used in the apache configuration file, it needs to be preceded by that and it will then apply to all applications. Alternatively it can be used in an fcgid wrapper, and then it does not need to be preceded by that additional directive. Maybe check the "Examples" section in mod_fcgid - Apache HTTP Server Version 2.5 and search for "PHP_FCGI_MAX_REQUEST" it has a matching and working example.
 
Back
Top