nginx, fcgi+perl forking a new process per request ...

Maxim Dounin mdounin at
Mon Mar 15 15:26:50 MSK 2010


On Mon, Mar 15, 2010 at 02:13:28PM +0200, Stefan Parvu wrote:

> Im trying to experiment more regarding nginx + fcgi,perl. Im using the
> following configuration:
> OS: Solaris 10 x86
> Perl CGI support: nginx-fcgi-0.4.3


> I have all processes running, ptree command:
> 5548  /opt/sdr/report/perl/bin/perl /opt/sdr/report/ws/sbin/nginx-fcgi -l /opt/sdr/re
> 5552  /opt/sdr/report/ws/sbin/nginx -c /opt/sdr/report/ws/conf/nginx.conf
>   5553  /opt/sdr/report/ws/sbin/nginx -c /opt/sdr/report/ws/conf/nginx.conf
> When I kick a jmeter test against the server I can see dozens of processes
> forked by the 5548 the master FCGI process. As understood I should not
> see this behavior when using FastCGI, isnt it ?

1. FastCGI is just protocol, nothing more.  Implementation details 
(including number of forked processes) are up to FastCGI 

2. Script you refer to is just wrapper which executes CGI scripts.  
And it does so by running separate process for each request.

Maxim Dounin

More information about the nginx mailing list