Re: [Mongrel] Why Rails + mongrel_cluster + load balancing doesn't work for us and the beginning of a solution

2006-09-21 Thread Alexander Lazic
On Mit 20.09.2006 11:18, Paul Butcher wrote:

We have been searching for a Rails deployment architecture which works
for us for some time. We've recently moved from Apache 1.3 + FastCGI to
Apache 2.2 + mod_proxy_balancer + mongrel_cluster, and it's a
significant improvement. But it still exhibits serious performance
problems.

Have you ever use haproxy http://haproxy.1wt.eu/ ?!

He have the following feature which can help you:

---
http://haproxy.1wt.eu/download/1.2/doc/haproxy-en.txt
3.4) Limiting the number of concurrent sessions on each server

weight minconn maxconn
---

This tool can also check the availibility of your backends.
For ssl you need a ssl-termination SW such as stunnel or delegate or
which ever SW you prefer.

On the haproxy site you have a patch for stunnel for the x-forwarded-for
header, if you need ;-)

Regards

Alex
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


[Mongrel] File uploads intermittent upon first form submission

2006-09-21 Thread Mike Evans
I have Mongrel 0.3.13.4 running Rails 1.1.6 behind Apache 2.2.3 with  
mod_proxy_balancer, mongrel_cluster 0.2.0 as per the documentation,  
and mongrel_upload_progress 0.2, on Fedora Core 4. I'm using a  
cluster of three Mongrels.

I have an existing app which allows users to upload files, and I'm  
migrating it to Mongrel from Lighttpd. Uploading files via multipart  
forms fails intermittently, using both my existing code and the  
mongrel_upload_progress example files/upload action. (My existing  
code doesn't reference anything to do with mongrel_upload_progress at  
all, so I don't think that's specifically at fault.)

When it fails there is apparently no attempt to upload the file - the  
packets aren't being sent from my laptop and the form just sits  
there. A second submission of the form will work. Refresh the page,  
select the same file to upload, and maybe it will work first click,  
maybe not. Rinse and repeat. Small files less than 100kb seem to work  
first time, every time.

Can anyone suggest an avenue of enquiry to try and work out what the  
problem might be?

Cheers,

Mike

___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


[Mongrel] Static files in public

2006-09-21 Thread Kris Leech
My question is about the static files in the Rails public folder. These 
files should be served by Apache instead of Mongrel, so do I need to 
upload these files to Apache's htdoc's or will Apache cache them the 
first time they are requested from Mongrel... Im not sure how this works?

Many thanks.



___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] How do you use Mongrel?

2006-09-21 Thread Carl Lerche
Well, right now I use mongrel for deploying my live rails apps. Pretty
standard I guess. I've currently been using mongrel_cluster, but I
would like to eventually use some kind of process monitoring (monit?).
I have yet to really look into it though. The book really should cover
how to use mongrel with capistrano since it seems to be the standard
deployment method. I'm also working on an application that would
require to track bandwidth sent out per user (members upload files and
get x amount of MB of bandwidth a month). I'm thinking of writing a
mongrel handler and doing it like that, but I'm not sure if that's the
best way or not.

-carl

On 9/20/06, Matt Pelletier [EMAIL PROTECTED] wrote:
 Hey folks,

 I'm working on the Mongrel book with Zed, and wanted to get some
 feedback from the core users (this list) about how they use Mongrel.
 That sounds a bit vague, but I'm interested in hearing things about
 frustrating problems / workaround, preferred configurations, if you
 have a particular way you set up / store your config files when
 developing / deploying an app, for those of you running multiple
 handlers, if you have had to deal with any subtle issues, if there
 were any gotchas you encountered along the way from the docs that
 could be fixed (in the docs) or improved, any tricks you figured out
 along the way, etc. Any info will be credited properly.

 Thanks in advance.
 Matt

 ===
 Matt Pelletier
 EastMedia
 t. 212-967-4239
 f. 212-967-4257
 m. 917-902-2525
 w. www.eastmedia.com


 ___
 Mongrel-users mailing list
 Mongrel-users@rubyforge.org
 http://rubyforge.org/mailman/listinfo/mongrel-users

___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] How do you use Mongrel?

2006-09-21 Thread Philip Hallstrom
 I'm working on the Mongrel book with Zed, and wanted to get some
 feedback from the core users (this list) about how they use Mongrel.
 That sounds a bit vague, but I'm interested in hearing things about
 frustrating problems / workaround, preferred configurations, if you
 have a particular way you set up / store your config files when
 developing / deploying an app, for those of you running multiple
 handlers, if you have had to deal with any subtle issues, if there
 were any gotchas you encountered along the way from the docs that
 could be fixed (in the docs) or improved, any tricks you figured out
 along the way, etc. Any info will be credited properly.

The only issue we've had is related to memcache connections not closing 
when you do a cluster:restart. See:

http://rubyforge.org/tracker/index.php?func=detailaid=5268group_id=1306atid=5145

Zed said this is a rails problem and I believe him.  I imagine if I spent 
some time looking at it some more I'd figure out how to close the memcache 
connections within rails, but at the time we simply made the decision to 
hard restart mongrel (and apache) when necessary.

Reason I mention this is the docs I was able to find about setting up 
memcache for use as fragment/session caching don't mention this as an 
issue, and it bit us...

Actually I guess there is one other issue we've noticed... on a heavily 
hit server, restarting just mongrel, apache seems to take a little while 
to find it again.  So we restart apache after restarting mongrel.

Super minor issues all things considered :-)  We were restarting 
lighttpd/fastcgi via cron, hourly...

-philip
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] Static files in public

2006-09-21 Thread Hendrik Stier
Hi!

Take a look at this document: http://mongrel.rubyforge.org/docs/ 
apache.html

You should leave the static files in the public folder of your  
application, and configure Apache to use rewriting (see section  
Configuring Apache2).

Regards,

Hendrik

Am 21.09.2006 um 16:27 schrieb Kris Leech:

 My question is about the static files in the Rails public folder.  
 These
 files should be served by Apache instead of Mongrel, so do I need to
 upload these files to Apache's htdoc's or will Apache cache them the
 first time they are requested from Mongrel... Im not sure how this  
 works?

 Many thanks.



 ___
 Mongrel-users mailing list
 Mongrel-users@rubyforge.org
 http://rubyforge.org/mailman/listinfo/mongrel-users

___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] How do you use Mongrel?

2006-09-21 Thread Vishnu Gopal
Hey,We use the following elements for our deployment:1. A hardware load balancer with two servers as backends, each running:2. One lighttpd instance, routed to a pound acting as a load balancer, each with:
3. Two mongrel instances.4. A monit process on each server monitoring pound, lighty  mongrel.5. A separate database server with monit running on that too.In addition, adding Capistrano's cap stop and start_mongrel_cluster magic scripts to the way we deploy.
Mongrel's been amazing.VishOn 9/21/06, Carl Lerche [EMAIL PROTECTED] wrote:
Well, right now I use mongrel for deploying my live rails apps. Prettystandard I guess. I've currently been using mongrel_cluster, but Iwould like to eventually use some kind of process monitoring (monit?).I have yet to really look into it though. The book really should cover
how to use mongrel with capistrano since it seems to be the standarddeployment method. I'm also working on an application that wouldrequire to track bandwidth sent out per user (members upload files and
get x amount of MB of bandwidth a month). I'm thinking of writing amongrel handler and doing it like that, but I'm not sure if that's thebest way or not.-carlOn 9/20/06, Matt Pelletier 
[EMAIL PROTECTED] wrote: Hey folks, I'm working on the Mongrel book with Zed, and wanted to get some feedback from the core users (this list) about how they use Mongrel. That sounds a bit vague, but I'm interested in hearing things about
 frustrating problems / workaround, preferred configurations, if you have a particular way you set up / store your config files when developing / deploying an app, for those of you running multiple
 handlers, if you have had to deal with any subtle issues, if there were any gotchas you encountered along the way from the docs that could be fixed (in the docs) or improved, any tricks you figured out
 along the way, etc. Any info will be credited properly. Thanks in advance. Matt === Matt Pelletier EastMedia t. 212-967-4239 f. 212-967-4257
 m. 917-902-2525 w. www.eastmedia.com ___ Mongrel-users mailing list 
Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users___Mongrel-users mailing list
Mongrel-users@rubyforge.orghttp://rubyforge.org/mailman/listinfo/mongrel-users

___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Re: [Mongrel] How do you use Mongrel?

2006-09-21 Thread Kirk Haines
On 9/20/06, Matt Pelletier [EMAIL PROTECTED] wrote:

 I'm working on the Mongrel book with Zed, and wanted to get some
 feedback from the core users (this list) about how they use Mongrel.
 That sounds a bit vague, but I'm interested in hearing things about
 frustrating problems / workaround, preferred configurations, if you
 have a particular way you set up / store your config files when
 developing / deploying an app, for those of you running multiple
 handlers, if you have had to deal with any subtle issues, if there
 were any gotchas you encountered along the way from the docs that
 could be fixed (in the docs) or improved, any tricks you figured out
 along the way, etc. Any info will be credited properly.

I have just recently (in the last two weeks) put working Mongrel
support into IOWA, and I as well as some users are already using it as
a deployment platform for sites and apps even though I've not done a
new production release with the support, yet.  I am also using the
trie classifier library in one of the dispatchers that I am bundling
with IOWA (dispatchers in IOWA are modular, so one can pick from a few
in the distribtution, or just plug in something custom to do what one
needs).

Performance is comparable to using apache2 with the mod_ruby handler
for communication, and is close to fcgi performance, but configuration
and testing is much simpler, so it is a definite win for me.


Kirk Haines
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] Static files in public

2006-09-21 Thread hemant
On 9/21/06, Kris Leech [EMAIL PROTECTED] wrote:
 My question is about the static files in the Rails public folder. These
 files should be served by Apache instead of Mongrel, so do I need to
 upload these files to Apache's htdoc's or will Apache cache them the
 first time they are requested from Mongrel... Im not sure how this works?

 Many


Please search through the mailing list. Someone explained nicely, how
rewrite rules that you probably copied from mongrel page...searches
for the existence of a fileit it finds the requested file...well
apache serves it..otherwise it assumes, a dynamic request and forwards
it to mongrel.

-- 
There was only one Road; that it was like a great river: its springs
were at every doorstep, and every path was its tributary.
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] Why Rails + mongrel_cluster + load balancing doesn'twork for us and the beginning of a solution

2006-09-21 Thread Paul Butcher
 Have you ever use haproxy http://haproxy.1wt.eu/ ?!

In a word, no :-)

 He have the following feature which can help you:

Thanks - sounds interesting. We'll give it a go!

--
paul.butcher-msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

MSN: [EMAIL PROTECTED]
AIM: paulrabutcher
Skype: paulrabutcher
LinkedIn: https://www.linkedin.com/in/paulbutcher

___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] Spinning mongrels and SIGUSR1

2006-09-21 Thread Zed Shaw
On Wed, 2006-09-20 at 19:22 -0700, Zed Shaw wrote:
 On Wed, 2006-09-20 at 18:26 -0400, Ian C. Blenke wrote:
  First off: Our clusters are LVS balanced Apache 2.2.3 + 
  mod_proxy_balancer + gem mongrel 0.3.13.3 / mongrel_cluster 0.2 + 
  memcached / gem memcache_client + gem rails 1.1.6 on debian boxen, and a 
  pgcluster backend.
  
  On 2 of our deployed clusters, we are getting the spinning mongrel 
  problem. As the clusters are very low volume right now, it takes days to 
  collect a spinner, making it difficult to debug what the problem might be.
  
   From what I've been following on the list, the appropriate next 
  debugging step is to send a SIGUSR1 signal to the spinning mongrel to 
  get it to spit out what it thinks it is currently running.
 
 USR2 is the debugging signal.  You actually want to turn it on a few
 minutes after they start, and it's safe to turn on in production (not
 much of a performance hit).
 

I'm such an idiot.  It is USR1.  You've got the 0.3.13.3 version of
mongrel, so you need to upgrade if you want to get the USR1 debugging.

Sorry.

Zed

___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


[Mongrel] Sync and Mutex compatible?

2006-09-21 Thread Steven Lumos

With Mongrel using Sync, are there any potential problems with actions
that start threads and use Mutex?

Steve

___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] thank you

2006-09-21 Thread carmen
On Thu Sep 21, 2006 at 07:52:05AM -0700, Carl Lerche wrote:
 You know, I'm going to add to this. I love mongrel. Simple, easy to
 use, flexible, etc... You're doing an amazing job with it :)

mongrel is so easy to use, i dont even know im using it.  actually removed all 
traces of webrick from /usr/lib/ruby and uninstalled lighttpd just to make 
sure. i'm not positive, but im prettty sure mongrel is my seeing eye dog when 
camping in the yard, fetching tent poles and scaring away indians with his ugly 
mug...


 
 So thanks!
 ___
 Mongrel-users mailing list
 Mongrel-users@rubyforge.org
 http://rubyforge.org/mailman/listinfo/mongrel-users
 
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users