Setups two rails app in different location

Hi.

I have two different rails app under the same server, using the same IP.

How can do it? my primary web site is working correctly but the second
one
no.

this is my config.

you need to setup another upstream block which specifies the ports for
second batch of mongrels and then proxy to that.

eg

upstream mongrel_cluster_2 {
server 127.0.0.1:4000;
server 127.0.0.1:4001;
server 127.0.0.1:4002;
server 127.0.0.1:4003;
}

proxy_pass http://mongrel_cluster_2

make sure your 2nd cluster config is setup to use different ports from
your first mongrel cluster

side note: you seem to have some references to fcgi and apache in your
config – you might want to clean those out…

Thank you for your suggest.

No my two rails instances are working fine, the only problem is:

The second instance is very slow, maybe a need do some tuning in nginx ?

Regards.

Francisco,
How much ram is available on the server for your mongrel instances?
I’ve found that each mongrel takes at least 90mb of ram, so 8
instances could easily be maxing out memory on your box, which would
cause things to slow down dramatically.

BJ Clark
the science department
[email protected]
www.scidept.com

Does it answer “fast” when you do a direct hit on the mongrels?


Aníbal Rojas
http://hasmanydevelopers.com
http://rubycorner.com
http://anibal.rojas.com

You are running out of memory, too many Mongrels.

I would recommend switching to the Rails Deployment Google Group:

http://groups.google.com/group/rubyonrails-deployment

As you already fixed your Nginx issue.

Aníbal Rojas
http://hasmanydevelopers.com
http://rubycorner.com
http://anibal.rojas.com

:wink:

I have only 128MB both rails app are typo blogs . my server are running
OpenBSD 4.1 stable.
One typo instance work fine but the second one none. I hope put more RAM
today .

Regards.

Yes, my nginx I has fixed nginx issues, it run fine now

I think increasing RAM size can be help and it can run more better.

Regards.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs