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

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.

Zend Server versions 2020.x and 2021.x and higher:

Please back up this file before making any changes!

Edit file     /www/zendphp74/conf/fastcgi.conf  

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.


Zend Server 9.1.x, 2018.x and 2019.x

Please back up this file before making any changes!

To begin, first please read the note above about choosing a safe editor.

Then, please edit file /www/zendphp7/conf/fastcgi.conf  

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.

Zend Server 6, 7, 8, or 8.5

Please back up this file before making any changes!

Edit file    /www/zendsvr6/conf/fastcgi.conf

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.