SCGI and Concurrency

A potentially dumb SCGI question here…

I am trying out SCGI. It’s a great departure from the complexity of
FastCGI.

Anyway, with FCGI I am used to seeing multiple dispatcher.fcgi processes
in
my ‘ps aux’ output.

With SCGI I see only a single entry. I assume then that SCGI is doing
internal threading instead of process forking?

The only thing that threw me is that with FCGI I would see multiple
database
connections open and I only see a single connection with my SCGI setup.

Did I miss a flag to have multiple listeners? Looking at the doco, I
didn’t
see anything.

If anyone has any info, it is appreciated.

Cheers.

Hi !

2005/12/9, Hunter’s Lists [email protected]:

A potentially dumb SCGI question here…

Nope, never. What you want is an SCGI cluster.

Works mostly the same way, except you replace scgi_ctrl with
scgi_cluster.

Configuration example:
scgi_cluster config -c 3 -e production -p 2049 -h 127.0.0.1

Configure 3 children (-c 3) in production environment (-e production),
listening on consecutive ports starting at 2049 (-p 2049), and bind
only on 127.0.0.1 (-h 127.0.0.1).

Then, you start the cluster like this:
scgi_cluster start

Hope that helps !

Excellent!

I did see that in the documentation.

Now, on to my next question - do I have to change my Apache 2 config?

I have a single SCGIMount directive:

SCGIMount / 127.0.0.1:9999

Do I need to do anything to tell Apache to hand off to the extra
instances?

Thanks again,
Hunter

From: Francois B. [email protected]
Reply-To: [email protected]
Date: Fri, 9 Dec 2005 20:33:05 -0500
To: [email protected]
Subject: Re: [Rails] SCGI and Concurrency

Hi !

2005/12/9, Hunter’s Lists [email protected]:

A potentially
dumb SCGI question here…

Nope, never. What you want is an SCGI

cluster.

Works mostly the same way, except you replace scgi_ctrl with

scgi_cluster.

Configuration example:
scgi_cluster config -c 3 -e production

-p 2049 -h 127.0.0.1

Configure 3 children (-c 3) in production environment

(-e production),
listening on consecutive ports starting at 2049 (-p 2049),
and bind
only on 127.0.0.1 (-h 127.0.0.1).

Then, you start the cluster like

this:
scgi_cluster start

Hope that helps !

François

Beausoleil
http://blog.teksol.info/

Hi !

2005/12/9, Hunter’s Lists [email protected]:

Now, on to my next question - do I have to change my Apache 2 config?

Eh, I have the same problem. Seems Apache does not play well with
SCGI clusters… See the thread entitled “SCGI cluster configuration
example for Apache”. I can’t provide you with a link, unfortunately,
because I can’t find it in the gmane archive…

There were two solutions in there. Haven’t tried any of them yet.

Bye !

Yeah, I can’t find the thread either…

Does anyone have a link?

From: Francois B. [email protected]
Reply-To: [email protected]
Date: Fri, 9 Dec 2005 22:46:18 -0500
To: [email protected]
Subject: Re: [Rails] SCGI and Concurrency

Hi !

2005/12/9, Hunter’s Lists [email protected]:

Now, on to my
next question - do I have to change my Apache 2 config?

Eh, I have the same

problem. Seems Apache does not play well with
SCGI clusters… See the
thread entitled “SCGI cluster configuration
example for Apache”. I can’t
provide you with a link, unfortunately,
because I can’t find it in the gmane
archive…

There were two solutions in there. Haven’t tried any of them

yet.

Bye !

François Beausoleil
http://blog.teksol.info/

2005/12/10, Hunter’s Lists [email protected]:

Yeah, I can’t find the thread either…

Does anyone have a link?

Here it is : http://article.gmane.org/gmane.comp.lang.ruby.rails/33836

Thanks.

So, is anyone using this method or using an SCGI cluster with Apache 2?

Does this uber hack work?

Hunter