librelist archives

« back to archive

mongrel2->rack->sinatra ...

mongrel2->rack->sinatra ...

From:
James Ladd
Date:
2011-10-18 @ 02:57
I used the khi-rack-mongrel2 gem to mount my handlers as Sinatra apps.
However, only one request is being serviced at a time (serial).

Not sure if this is a Mongrel2 config or Rack / Sinatra config issue.

Can anyone help?

Re: [mongrel2] mongrel2->rack->sinatra ...

From:
Nathan Duran
Date:
2011-10-18 @ 03:18
On Oct 17, 2011, at 7:57 PM, James Ladd wrote:

> I used the khi-rack-mongrel2 gem to mount my handlers as Sinatra apps.
> However, only one request is being serviced at a time (serial).
> 
> Not sure if this is a Mongrel2 config or Rack / Sinatra config issue.
> 
> Can anyone help?

How many processes did you start? I quit the job I was maintaining that 
for six months ago, so it's possible a new Rack version has busted it, but
that sounds a little odd. 

Re: [mongrel2] mongrel2->rack->sinatra ...

From:
James Ladd
Date:
2011-10-18 @ 03:23
I started only two processes with rackup yet each was sequentially processed
which I find weird

On Tue, Oct 18, 2011 at 2:18 PM, Nathan Duran <principal@khiltd.com> wrote:

>
> On Oct 17, 2011, at 7:57 PM, James Ladd wrote:
>
> > I used the khi-rack-mongrel2 gem to mount my handlers as Sinatra apps.
> > However, only one request is being serviced at a time (serial).
> >
> > Not sure if this is a Mongrel2 config or Rack / Sinatra config issue.
> >
> > Can anyone help?
>
> How many processes did you start? I quit the job I was maintaining that for
> six months ago, so it's possible a new Rack version has busted it, but that
> sounds a little odd.
>
>

Re: [mongrel2] mongrel2->rack->sinatra ...

From:
James Ladd
Date:
2011-10-18 @ 03:28
I think I was not clear which you query made me realise.

I have mongrel2 and two workers running and work is distributed amongst the
two.

What I would like to do is have more than 1 request handled by each worker -
ideally a
configurable amount of work.

On Tue, Oct 18, 2011 at 2:23 PM, James Ladd <james.ladd@playup.com> wrote:

> I started only two processes with rackup yet each was sequentially
> processed which I find weird
>
> On Tue, Oct 18, 2011 at 2:18 PM, Nathan Duran <principal@khiltd.com>wrote:
>
>>
>> On Oct 17, 2011, at 7:57 PM, James Ladd wrote:
>>
>> > I used the khi-rack-mongrel2 gem to mount my handlers as Sinatra apps.
>> > However, only one request is being serviced at a time (serial).
>> >
>> > Not sure if this is a Mongrel2 config or Rack / Sinatra config issue.
>> >
>> > Can anyone help?
>>
>> How many processes did you start? I quit the job I was maintaining that
>> for six months ago, so it's possible a new Rack version has busted it, but
>> that sounds a little odd.
>>
>>
>

Re: [mongrel2] mongrel2->rack->sinatra ...

From:
Nathan Duran
Date:
2011-10-18 @ 04:09
On Oct 17, 2011, at 8:28 PM, James Ladd wrote:

> I think I was not clear which you query made me realise.
> 
> I have mongrel2 and two workers running and work is distributed amongst the
> two.
> 
> What I would like to do is have more than 1 request handled by each worker -
> ideally a
> configurable amount of work.

It doesn't really work that way. One process handles one request at a time
unless you want to thread it, and I wouldn't recommend threading anything 
in Ruby.

Re: [mongrel2] mongrel2->rack->sinatra ...

From:
James Ladd
Date:
2011-10-18 @ 04:12
What about async sinatra?

On Tue, Oct 18, 2011 at 3:09 PM, Nathan Duran <principal@khiltd.com> wrote:

>
> On Oct 17, 2011, at 8:28 PM, James Ladd wrote:
>
> > I think I was not clear which you query made me realise.
> >
> > I have mongrel2 and two workers running and work is distributed amongst
> the
> > two.
> >
> > What I would like to do is have more than 1 request handled by each
> worker -
> > ideally a
> > configurable amount of work.
>
> It doesn't really work that way. One process handles one request at a time
> unless you want to thread it, and I wouldn't recommend threading anything in
> Ruby.
>

Re: [mongrel2] mongrel2->rack->sinatra ...

From:
Nathan Duran
Date:
2011-10-18 @ 04:54
On Oct 17, 2011, at 9:12 PM, James Ladd wrote:

> What about async sinatra?

Doesn't claim to support Mongrel2.

Re: [mongrel2] mongrel2->rack->sinatra ...

From:
James Ladd
Date:
2011-10-18 @ 05:00
I can see where a simple thread pool could be placed when needed.
For now, I'll resist the temptation and continue with Process based workers.

On Tue, Oct 18, 2011 at 3:54 PM, Nathan Duran <principal@khiltd.com> wrote:

>
> On Oct 17, 2011, at 9:12 PM, James Ladd wrote:
>
> > What about async sinatra?
>
> Doesn't claim to support Mongrel2.
>