Increase FastCGI child processes on IBM i

Follow

Issue

On the IBM i, PHP runs under Apache via FastCGI.  FastCGI configuration tells how many PHP child processes will run.  Each child process can handle one PHP request at a time.  By default, Zend Server installations specify ten PHP children.  This is usually ample, but some IBM i applications may have a very high number of users, scripts that run linger than a fraction of a second (long queries or calls to RPG programs), or both.  In these circumstances, Apache may run out of available child processes.  This article tells how to increase them.

Environment

Any version of Zend Server for IBM i running on any supported version of IBM i.

Resolution

Note: This configuration uses Linux style end of line, so needs an editor that will not change to Windows style end of line.
Some Windows specific editors like Notepad will end each line of text with a CR-LF, which is not valid for Linux.  Please use an editor like Zend Studio or Notepad ++ that will not do this.  Also, please make a back up copy of your file before editing.

To begin, first please read the note above about choosing a safe editor. Then, please edit file /www/zendphp7/conf/fastcgi.conf  (Zend Server 9 or higher) or /www/zendsvr6/conf/fastcgi.conf (Zend Server 6, 7, 8, or 8.5) (please back up this file before making any changes!): 

Window over to find the number of child processes in the first line that is not a comment. Look for this: 

SetEnv="PHP_FCGI_CHILDREN=10"

Set the number to the number of processes you want. For example, to set it to 25, change it to this:

SetEnv="PHP_FCGI_CHILDREN=25"

Be sure that this line in the configuration remains all on one line. Save and exit.

Restart Apache for this change to take effect.

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk