Welcome! Log In Create A New Profile

Advanced

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

All files from this thread

File Name File Size   Posted by Date  
php-fastcgi 3.9 KB open | download vesperto 03/15/2010 Read message
Stefan Parvu
March 15, 2010 08:18AM
Hi,

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
http://www.nginx.eu/nginx-fcgi.html

worker_processes 1;

location ~ ^/cgi-bin/.*\.cgi$ {
gzip off;
fastcgi_pass unix:/opt/sdr/report/ws/fastcgi_temp/nginx-fcgi.sock;
fastcgi_read_timeout 5m;
fastcgi_index index.cgi;
#
# You may copy and paste the lines under or use include directive
# include /etc/nginx/nginx-fcgi.conf;
# In this example all is in one file
#
fastcgi_param SCRIPT_FILENAME /opt/sdr/report/docroot/$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
}


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 ?

Example, using DTrace:

# /opt/csw/bin/execsnoop
UID PID PPID ARGS
60001 18035 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18038 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18039 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18040 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18041 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18042 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18044 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18045 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18046 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18031 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18032 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18033 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18034 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18036 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18037 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18043 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18047 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi
60001 18048 5548 /opt/sdr/report/perl/bin/perl -wT /opt/sdr/report/docroot//cgi-bin/initial.cgi

[...]


Any ideas ?


Thanks,
Stefan



_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

Stefan Parvu March 15, 2010 08:18AM

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

Maxim Dounin March 15, 2010 08:32AM

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

Stefan Parvu March 15, 2010 08:46AM

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

vesperto March 15, 2010 12:30PM

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

Stefan Parvu March 15, 2010 12:42PM

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

Roger Hoover March 15, 2010 12:54PM

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

Stefan Parvu March 15, 2010 03:36PM

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

Grzegorz Nosek March 15, 2010 04:20PM

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

Stefan Parvu March 15, 2010 05:14PM

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

Stefan Parvu March 20, 2010 08:42AM

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

Grzegorz Nosek March 20, 2010 02:18PM

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

Stefan Parvu March 21, 2010 08:16AM

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

Marcin Gryszkalis March 16, 2010 06:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 118
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready