0

We have nginx installed and would like to spawn-fcgi multiple ".fcgi" files. The programs were written in C. How do we spawn all the files at one go ?

Edit

This is the scenario :

I have 3 different programs to serve. Lets say, I've search results from google, yahoo, bing. I want to show 3 columns which host results of above providers. I have 3 fcgi scripts, one for each provider.
How do you suggest I put all 3 into action ?

Shrinath
  • 297
  • 1
  • 3
  • 18
  • Why do you want to? Any decent server should spawn processes on demand (and then keep them running so it isn't a repeated expense). – Quentin Jan 03 '11 at 08:14
  • I have 3 different programs to serve. Lets say, I've search results from google, yahoo, bing. I want to show 3 columns which host results of above providers. I have 3 fcgi scripts, one for each provider. How do you suggest I put all 3 into action ? – Shrinath Jan 05 '11 at 06:35

1 Answers1

1

The fact that you're calling them "FCGI scripts" implies that you intend for your executables to be short-lived; this isn't really what FCGI was designed for. One of the features of FCGI is that processes are designed to be long-running (compared to old-school CGI scripts which re-initialized each time they were called).

Instead of switching between three different executables connected via FCGI, could you use a single long-running executable via FCGI that has an internal function pointer to define the desired functionality on a call-by-call basis?

The other half of your question relates to how to manage the running FCGI application to allow it to be accessed via nginx. You'll need a process management application like supervisor to launch and monitor your FCGI application.

HikeOnPast
  • 539
  • 3
  • 8