How to monitor mongrel server running ROR application on Windows? - ruby-on-rails

I have a Ruby on rails application that freezes over time. The rails logs are clean and donotshow anything. I suspect it freezes without any activity.
Is there a way i can monitor and profile the mongrel server for leaks and errors?
If yes how do i go about doing it.
There are tools like 'bleak_house' which work only for unix.
Thanks
Shaunak

As far as I know there are no tools to monitor mongrel on windows

Related

Monitoring ROR server (thin or mongrel) for resources and availability in WINDOWS and re-spawn

First thing I would like to say is, i know deploying ror applications in windows is not recommended, but in this case i have no choice due to some client restrictions.
I am looking for a tool like Upstart for windows which will moniter my instance of Thin or Mongrel and will 're-spawn' in case of crashes or availability.
Now I looked around quite a bit and most solutions like UpStart, or Passenger server are only available for Unix environments.
Any known tools for windows? and how to use them?
I am also open to any alternative ror servers for windows that can do this automatically like passenger does.
Thanks
Shaunak
Maybe a bat script as a scheduled task to run wmic process, scan to find Mongrel, and if it's not found to run it?
Sorry, I'd do it in bash, or I'd have a code example for you.
This would also make a good python script, in my opinion.

ruby server stability on windows

My RoR app on windows (xp as well as server 2008) stops responding after maybe a couple of days.
Using guidance from stackoverflow as well, I set up services to run the server automatically at startup. I tried different products: webrick, mongrel with mongrel_service, thin – both standalone or with an apache proxy. They start ok and work fine, but after a certain amount of time (rather than load) it stops responding.
I don't see anything in the logs either, even if I have the server run from the command line I don't get any error messages there nor does the process end, the server just does not answer anymore. Has anybody else come across this?
Andreas
There are so many issues with windows that our whole company switched to ubuntu. I would not advise this as a production solution.

Run thin webserver as a windows service

i'm trying to deploy in production Redmine application. I heard that thin is the fastest ruby on rails webserver so I installed it. Now I have a really simple problem: i must start it every time i reboot the machine via cmd because there isn't a prebuilt windows service or something similar that allow me to autostart it. How could i fix the problem? I saw that there is a bat file, so i tried to make a C# windows service like this and it starts correctly but if I stop it the service stops but the webserver is still active and it will never shutdown. The only way to stop thin is to reboot the machine. Maybe I'm wrong, could someone post an example of how should i run thin as a windows service?
i've written a blogpost about this a while ago, but most of it should still be applicable. Hope it helps.
But to be honest, i always deploy on windows using the mongrel-service gem, and configure an apache in front to load-balance between 3 mongrels. Much easier.
Also the big advantage for me was that if something went wrong with thin-service, it didn't restart automatically, while the mongrel-service guards your mongrel process, and if it for whatever reason goes down, it will restart it again. For me that was something i could not miss.

How to use a VM to create a Rails staging environment

My app is in development and I do all my testing using WEBrick (I like the terminal output).
On the production server it will run on Phusion Passenger.
I'm running Snow Leopard and wish to test the app in an environment similar to the production environment.
Can I use Parallels to run a Debian install with Apache and Passenger and configure Capistrano to deploy to that?
Thanks!
I have been using VMware for that sort of thing. Its really easy to deal with network wise. I have recently switched to Virtualbox which is much nicer to actually work in (at least for me), does the same things, and is free. Download the Debian iso and create a new VM that uses it as its CDrom. Thats about all you need to do. Good luck.
This may not be the answer you're looking for but I've found it very straightforward to just run passenger locally for development. You can always tail the development.log, it's really just as easy as watching the terminal output from webrick.
Dev setup is made all the easier with the drag and drop ease of the phusion passenger pref pane.
http://www.fngtps.com/passenger-preference-pane
Seems like it would be easier than setting up the VM and all. Though yes, there could still be differences if your not hosting on OS X server I suppose.

How to run rails website permanently on Mac OS X

i've developed small web app for personal use with Ruby on Rails. Now when i want to use it I open Terminal and run ruby script/server to run mongrel then i go to Safari and type localhost:3000 to see my app.
I'd like to have this site start automatically on startup of mac and possibly to use some other URL.. preferably just http://myapp/
I come from C#/asp.net world and don't know much about apache/mongrel stuff.
Do you know any step by step tutorial how to configure rails/mongrel/apache on mac os x leopard to work together and run after startup, please? (I have apache running, which was done just by checking checkbox in system preferences/sharing)
This page by apple should have all the information you need:
http://developer.apple.com/tools/deployonrailsleopard.html
The easiest method would be to install Passenger Phusion / mod_rails for Apache. This will allow you to use sidestep the usage of Mongrel/Thin/etc and deploy apps much like php (stick it in a folder and go).
If you want to run it on Mac OS X you can simply setup your webserver, I recommend nginx with Phusion's Passenger, and your database server to start on boot, that way whenever your computer has to restart it will have your site running. Of course if this is a laptop that will be changing networks and needs to be accessed by other people I would recommend getting a proper VPS for it, come to think of it, I would recommend that anyway if this is supposed to be a production environment.

Resources