Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question
    
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 3 '11 at 8: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 5 '11 at 6:35

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.