osdir.com
mailing list archive

Subject: [ANN] mongrel_cluster 0.2.2 prerelease - msg#00191

List: lang.ruby.mongrel.general

Date: Prev Next Index Thread: Prev Next Index
Hey y'all:

I've added some new stuff to mongrel_cluster. Give it try and let me
know if it works for you.

* Added '--clean' to cluster::start to force removal of the pidfile
before trying to start the cluster member. This is useful for recovering
from unexpected process death.

* Added '--only PORT' to cluster::* to support running a command on a
single cluster member identified by its port number (eg, 8001). Inspired
by Kaspar Schiess.

* Added cluster::status to display basic process status information for
the cluster. Returns '0' if all processes are found and '2' if a process
or pidfile is missing. Supports '--only'. Status commands were also
added to the init.d script, mongrel_cluster_ctl, and the cap recipes.

* The init.d script (resources/mongrel_cluster) will now create
/var/run/mongrel_cluster and chown to a defined user on start. To fully
use this feature, update your cluster yml files to store the pidfile in
/var/run/mongrel_cluster. This will support cleaning up orphaned
pidfiles at boot time. For example:
pid_file: /var/run/mongrel_cluster/foo.pid

* Fixed a parameter bug with mongrel_cluster_ctl calling mongrel_rails.

How would you use some of these new features? Lets pretend that your
blog gets spammed by 3000+ comments and 2000+ trackbacks pushing your
process memory usage to 300mb+. The fair and just Linux kernel,
displeased by your actions, smites one of your processes using the all
powerful oom-killer. How do you recover?

$ mongrel_rails cluster::status
Checking 2 Mongrel servers...
Found dog: 8000
Lost dog: 8001

$ mongrel_rails cluster::start --only 8001 --clean
Cleaning 1 pid file...
Starting 1 Mongrel server...

$ mongrel_rails cluster::status
Checking 2 Mongrel servers...
Found dog: 8000
Found dog: 8001

I'm open to suggestions for some different 'status' output. Let me know
if I broke anything.

Install with:
sudo gem install mongrel_cluster --source
http://mongrel.rubyforge.org/releases/

Thanks,
Bradley Taylor
Rails Machine
http://railsmachine.com



Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: Mongrel with mephisto on a Virtual Private Server

Apache 2.0.x has mod_proxy which will allow you to proxy a single request. I use it all the time. IMHO, perfectly fine for a single instance blog. Apache 2.1 and above (so 2.2.2, 2.2.3, and 2.2.4) have this new fangled mod_proxy_balancer which let's you perform a "load" balancing of sorts and let apache do some serving of images and cached pages. Many of the other lightweight frontends like nginx, pound, and pen do a similar software load balance (and there's talk of lighttpd's proxy_core getting rewritten to do a similar round-robin, balancing load proxy). Regardless, don't load balance your blog yet -- you need metrics before you blow all your RAM serving up 8 mongrel instances when only one will ever get used. No offense, meant, honestly. I'm just saying. ;-) cheers! On 1/25/07, Ed Hickey <bassnode-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote: > I'm fairly certain you'll need to use at least Apache 2.2 for the proxy pass > to work. > http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ > > > On 1/25/07, Joe Clarke <joemclarke-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> > wrote: > > You will need to compile mod_proxy for ProxyPass to work correctly: > > > > Download the the source distro of Apache 2.0.52 if you don't already > > have it from apache.org , then from the modules/proxy directory run > > the following commands: > > > > apxs -c -a -i proxy_http.c > > apxs -i -a -c mod_proxy.c proxy_util.c > > > > -- > > Joe Clarke > > RailsPlayground.com > > > > On 1/25/07, Dave C <dklamath-PkbjNfxxIARBDgjK7y7TUQ@xxxxxxxxxxxxxxxx > > > wrote: > > > > > > > > > > > > Apache is running 2.0.52 and it does not show mod_proxy as an installed > > > module. Just mod_perl and mod_php5. > > > > > > thank you for answering Joe > > > > > > Dave > > > > > > > > > ----- Original Message ----- > > > From: Joe Clarke > > > To: mongrel-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > > > Sent: Thursday, January 25, 2007 4:28 PM > > > Subject: Re: [Mongrel] Mongrel with mephisto on a Virtual Private Server > > > > > > Hi Dave, > > > > > > What version of Apache are you running? Did you compile Apache with > > > mod_proxy support? > > > > > > -- > > > Joe Clarke > > > RailsPlayground.com > > > > > > On 1/25/07, Dave C < dklamath-PkbjNfxxIARBDgjK7y7TUQ@xxxxxxxxxxxxxxxx> > > > wrote: > > > > > > > > > > > > Hello everyone, > > > > > > > > I am trying to setup Mongrel to work with Apache on a VPS as part of a > > > > mephisto installation. Has anyone done this, and if so how did you > edit > > > your > > > > conf file to make it work? > > > > > > > > I used the info found on the mongrel site at: > > > > > > > > http://mongrel.rubyforge.org/docs/apache.html > > > > > > > > and one time I did get a mephisto splash screen, but it was only after > I > > > put > > > > in :8000 with my URL. > > > > > > > > I am trying to configure it with the domain davescorner.org and am > hosting > > > > with eapps. If I can get this to work I will be submitting a tutorial > on > > > how > > > > to configure mephisto and mongrel on an eapps account so any help in > a > > > newb > > > > friendly format would be extremely appreciated. > > > > > > > > Dave > > > > _______________________________________________ > > > > Mongrel-users mailing list > > > > Mongrel-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > _______________________________________________ > > > Mongrel-users mailing list > > > Mongrel-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > > -- > Ed Hickey > Developer > Litmus Media > 816-533-0409 > ehickey-A4HEbNdjHgMmlAP/+Wk3EA@xxxxxxxxxxxxxxxx > A Member of Think Partnership, Inc > www.ThinkPartnership.com > Amex ticker symbol: THK > _______________________________________________ > Mongrel-users mailing list > Mongrel-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > http://rubyforge.org/mailman/listinfo/mongrel-users > > -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com main: 678.389.9462 fax: 678.826.0969 Ruby on Rails Bootcamp at the Big Nerd Ranch Intensive Ruby on Rails Training: http://www.bignerdranch.com/classes/ruby.shtml

Next Message by Date: click to view message preview

Attention FreeBSD Gurus

I received this piece of code in a patch that turns on the FreeBSD http filtering. I completely missed that it calls /sbin/sysctl directly which means I'm slipping on my auditing. def configure_socket_options case RUBY_PLATFORM when /linux/ # 9 is currently TCP_DEFER_ACCEPT $tcp_defer_accept_opts = [Socket::SOL_TCP, 9, 1] $tcp_cork_opts = [Socket::SOL_TCP, 3, 1] when /freebsd/ # Use the HTTP accept filter if available. # The struct made by pack() is defined in /usr/include/sys/socket.h as accept_filter_arg unless `/sbin/sysctl -nq net.inet.accf.http`.empty? $tcp_defer_accept_opts = [Socket::SOL_SOCKET, Socket::SO_ACCEPTFILTER, ['httpready', nil].pack('a16a240')] end end end I'd like to know the following from the FreeBSD crew: 1) Are there any potential malicious potentials to this? I don't assume any intent, but would like to know if I need to rush out a fix if there's a hackable problem with this (even theoretical). 2) What would be the un-ghetto way to do this same check? Thanks a bunch. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.

Previous Message by Thread: click to view message preview

[ANN] fastthread-0.6.3

Quick note! fastthread 0.6.3 has been released to address a minor compatibility issue with ConditionVariable -- as with the original thread.rb, ConditionVariable can now be used with any mutex class implementing Mutex's public interface. As before, gem and tarball available from RubyForge courtesy of the Mongrel project: http://rubyforge.org/frs/?group_id=1306 -mental signature.asc Description: This is a digitally signed message part

Next Message by Thread: click to view message preview

Re: [ANN] mongrel_cluster 0.2.2 prerelease

On Jan 26, 2007, at 12:10 AM, Bradley Taylor wrote: > Hey y'all: > > I've added some new stuff to mongrel_cluster. Give it try and let me > know if it works for you. > > * Added '--clean' to cluster::start to force removal of the pidfile > before trying to start the cluster member. This is useful for > recovering > from unexpected process death. Oh this is absolutely fantastic. It actually turns out to be exactly what I needed today. We can't go 24 hours without ferret segfaulting mongrel on the most completely random searches ever - and the change to mongrel 1.0.1 from 0.3.13.4 seems to leave the pids laying around more. The --clean seems to be working great in my monit-initiated restarts (in production mind you :-) ) and now I can happily ignore trying to find the segfault needle in the ferret haystack again(*) Thanks Bradley! Jason (* yes I know it's completely lazy to ignore this. But a) laziness is a require virtue of systems management and b) trying to find a random segfault in thousands of lines of C code is no longer fun to me ;-) ) -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jason Young -- Systems Manager, eXtension http://about.extension.org/wiki/Jason_Young ______________________________________
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by