Re: Number of processes and slow FCGIs

Yalcin Bozcaada (bozcaada@OpenMarket.com)
Mon, 03 Feb 1997 11:44:22 -0500

Message-Id: <1.5.4.32.19970203164422.0093bcf0@mail-60.openmarket.com>
Date: Mon, 03 Feb 1997 11:44:22 -0500
To: Aleksandr Gleyzer <aqg4993@is3.nyu.edu>
From: Yalcin Bozcaada <bozcaada@OpenMarket.com>
Subject: Re: Number of processes and slow FCGIs

At 10:52 AM 2/3/97 -0500, you wrote:
>I was playing with making our search CGIs (ProC + Oracle) FastCGI. We
>are using SPARC Solaris 2.5 and OMI httpd. Now I'm trying to figure out
>what the server does then all running FastCGI processes are busy
>responding. Does it "fork" a new process, or just waits for the running
>processes to finish? Our search program is pretty slow, it takes about
>15 sec to complete the query, so when I have 4 FCGI processes running,
>and I reload the page without waiting for search to complete with Ctrl-R
>(trying to emulate a heavy-load situation :)), I get "Server error" (and
>"broken pipe" in the error.log) pretty quickly. At the same time with
>CGI version of the same search prog, the server just forks as many
>processess as it needs, and it works fine.
OMI Server would not fork another FastCGI process for a new coming request
when all apps are busy. And you will get the broken pipe. The reason to use
FastCGI is to gain speed by doing initialization part once and running off
it. If your CGI program takes the same time as your FastCGI, I suggest you
go back to CGI. At least you won't have to worry about broken pipe.
>
>So is it the only solution to keep 15 (or more) FCGI processes all the
>time and pray that we won't get more than 15 requests in 15 sec? (I
>guess we could)
>
I would say praying would help but, I heard Microsoft is buying Roman
Catholic Church, I would try not to rely so much on it. ;)

Increasing the number of processes is a solution, also you can increase
listen-queue-depth.

-yalcin  
*----------------------------------------------------------------*
*- yalcin Bozcaada						-*
*- Open Market Inc. "The Internet Commerce Company"		-*
*- 245 First Street, Cambridge, MA 02142  USA			-*
*- www.openmarket.com						-*
*- Phone: +1 617 949 7543 					-*
*----------------------------------------------------------------*