This forum is no longer active. Please post your questions to our new community site
Using Mongrel in RubyStack to serve pages in windows
|
|
Hi all, Am new to Rubystack and I have succeeded in installing it on my Windows box. Its running and I can access my site. The problem however is that its abit slow and every time I access a page, the webserver takes up all my computer resources (Processor usage goes to 100%). I think am serving the pages in webrick as apache is not running even after ‘servicerun.bat start’. What could be the problem? How do I use the mongrel cluster I have learnt about in my research? Any assistance will be greatly appreciated. Thanks |
|
|
Hi, You can find more information about how to create mongrel cluster and how to install mongrel as services at BitNami Quick Start Guide If you select “production mode” during the RubyStack installation the Stack will create an Apache configuration file to load balance between several mongrels but I don’t know if this configuration resolve your resources problem. Why do you think that you are serving pages with webrick? When you start the server you can see a message similar to this:
I hope it helps you. |
|
|
Hi, Here is what i get when I start the server: => Booting Mongrel (use ‘script/server webrick’ to force WEBrick) Starting Mongrel listening at 0.0.0.0:3000 The server seems to be running in development mode: does this havee any effect on the resources it uses? The reason I think am serving pages with webrick is because I can find apache running under processes (task manager) and the fact that am starting the server the same way I start webrick. Also if possible could you explain abit to me how load balancing is used in this case (use my 4 ports). Regards. |
|
|
Hi, I will try to do it. You can use Apache 2.2 to handle all incoming requests. Apache 2.2 uses mod_proxy to redirect the incoming HTTP requests to the mod_proxy_balancer cluster. The cluster consists of several Mongrel processes on each application server and distributes the requests. To create this setup you only have to start mongrels and configure Apache to run as a proxy balancer. The next file is an example which configures Apache to balance load with two Mongrel servers. If you want to add mongrels you only have to include more balancer members on different ports. This file is created during the RubyStack installation on production mode selection, depending of the number of mongrels and the ports chosen to Apache and Mongrel servers.
To Apache can load the redmine-mongrel-cluster.xml file you have to enable these modules into httpd.conf (RubyStack will be do automatically): LoadModule rewrite_module modules/mod_rewrite.so Using this configuration, you only have to start the mongrels and launch your web browser at http://your_ip:port/ and you will be redirected to one of them.
As you can see, you are running Mongrel by default. Webrick is different to Apache, both are independent servers. There is not relation between Apache processes and ruby on rails servers (webrick or mongrel). |

