librelist archives

« back to archive

Get Ready For zeromq-2.1.x required

Get Ready For zeromq-2.1.x required

From:
Zed A. Shaw
Date:
2011-02-09 @ 03:57
Hey Everyone,

After much digging I'm finding that the bug with 100% CPU will be fixed
by making Mongrel2 depend on zeromq-2.1.x.  I'm going to make the next
release require this version, so if you have issues building
zeromq-2.1.x latest then let me know so I can work with that.

Thanks.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
Ryan Kelly
Date:
2011-02-10 @ 08:52
On Tue, 2011-02-08 at 19:57 -0800, Zed A. Shaw wrote:
> Hey Everyone,
> 
> After much digging I'm finding that the bug with 100% CPU will be fixed
> by making Mongrel2 depend on zeromq-2.1.x.  I'm going to make the next
> release require this version, so if you have issues building
> zeromq-2.1.x latest then let me know so I can work with that.

I've been using 2.1 because the python bindings have much better support
for SIGINT, and hence python's KeyboardInterrupt handling.

Things have been pretty smooth, the only trouble I've noticed is that
mongrel2 doesn't shut down cleanly when built against 2.1.  I often need
to `kill -9` it when shutting down.

Haven't finished debugging but it seems possibly due to changed
behaviour of zmq_term().  As of 2.1 this will block until all sockets
are explicitly closed, while in older versions it would forcibly close
all remaining sockets.  Looking into it.

  Cheers,

     Ryan

-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
ryan@rfk.id.au        |  http://www.rfk.id.au/ramblings/gpg/ for details

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
Zed A. Shaw
Date:
2011-02-10 @ 17:20
On Thu, Feb 10, 2011 at 07:52:52PM +1100, Ryan Kelly wrote:
> On Tue, 2011-02-08 at 19:57 -0800, Zed A. Shaw wrote:
> I've been using 2.1 because the python bindings have much better support
> for SIGINT, and hence python's KeyboardInterrupt handling.

Oh, use CTRL-\ on python programs that are blocking CTRL-C. I seem to
just use that exclusively now with python.

> Haven't finished debugging but it seems possibly due to changed
> behaviour of zmq_term().  As of 2.1 this will block until all sockets
> are explicitly closed, while in older versions it would forcibly close
> all remaining sockets.  Looking into it.

I bet that's it.  I'll go and check out better shutdown processing.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
Ian Barber
Date:
2011-02-10 @ 11:57
On Thu, Feb 10, 2011 at 8:52 AM, Ryan Kelly <ryan@rfk.id.au> wrote:

>
> Haven't finished debugging but it seems possibly due to changed
> behaviour of zmq_term().  As of 2.1 this will block until all sockets
> are explicitly closed, while in older versions it would forcibly close
> all remaining sockets.  Looking into it.
>

Yeah, hat is new in 2.1, the sockopt LINGER will sort it though, set that to
0 and you basically have the old behavior.  (
https://github.com/zeromq/zeromq2/blob/master/doc/zmq_setsockopt.txt#L243 )

Ian

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
Zed A. Shaw
Date:
2011-02-10 @ 17:28
On Thu, Feb 10, 2011 at 11:57:03AM +0000, Ian Barber wrote:
> On Thu, Feb 10, 2011 at 8:52 AM, Ryan Kelly <ryan@rfk.id.au> wrote:
> 
> > Haven't finished debugging but it seems possibly due to changed
> > behaviour of zmq_term().  As of 2.1 this will block until all sockets
> > are explicitly closed, while in older versions it would forcibly close
> > all remaining sockets.  Looking into it.
> >
> 
> Yeah, hat is new in 2.1, the sockopt LINGER will sort it though, set that to
> 0 and you basically have the old behavior.  (
> https://github.com/zeromq/zeromq2/blob/master/doc/zmq_setsockopt.txt#L243 )

Actually, looks like Ryan just fixed this.  Awesome.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
David Kantowitz
Date:
2011-02-10 @ 17:54
On Thu, Feb 10, 2011 at 9:28 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote:

> On Thu, Feb 10, 2011 at 11:57:03AM +0000, Ian Barber wrote:
> > On Thu, Feb 10, 2011 at 8:52 AM, Ryan Kelly <ryan@rfk.id.au> wrote:
> >
> > > Haven't finished debugging but it seems possibly due to changed
> > > behaviour of zmq_term().  As of 2.1 this will block until all sockets
> > > are explicitly closed, while in older versions it would forcibly close
> > > all remaining sockets.  Looking into it.
> > >
> >
> > Yeah, hat is new in 2.1, the sockopt LINGER will sort it though, set that
> to
> > 0 and you basically have the old behavior.  (
> >
> https://github.com/zeromq/zeromq2/blob/master/doc/zmq_setsockopt.txt#L243)
>
> Actually, looks like Ryan just fixed this.  Awesome.


There are actually two new behaviors with zmq_term() in 2.1 to be careful
of:
 1) zmq_term() will obey the the sockopt LINGER timeout to give sockets a
chance to flush messages.
 2) zmq_term() will block until zmq_close() is called on all open zmq
sockets.

Setting LINGER to 0 tells zmq_term() to not wait for unsent messages to
finish, but you still need to make sure all sockets close before zmq_term()
will return.

-David K.

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
Sabin Iacob
Date:
2011-02-09 @ 23:52
On 02/09/2011 05:57 AM, Zed A. Shaw wrote:
> Hey Everyone,
>
> After much digging I'm finding that the bug with 100% CPU will be fixed
> by making Mongrel2 depend on zeromq-2.1.x.  I'm going to make the next
> release require this version, so if you have issues building
> zeromq-2.1.x latest then let me know so I can work with that.

I already have packages for zeromq 2.1 beta and python-zeromq 2.0.10 
(built with zeromq 2.1) for other stuff I'm working on, so I would have 
built the next mongrel2 packages against it anyway

AFAIK bindings will happily accept higher versions of the library across 
minor versions (the reverse is not recommended), so I guess there 
shouldn't be problems :)

 From what I've seen 2.1 seems to be a lot more stable than 2.0 and has 
some annoyances removed (2.0 has quite a few asserts that nuke the 
process and seems to cause high load and sluggish performance on kvm 
machines for some reason)

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
Loic d'Anterroches
Date:
2011-02-09 @ 07:58
Hello,

> After much digging I'm finding that the bug with 100% CPU will be fixed
> by making Mongrel2 depend on zeromq-2.1.x.  I'm going to make the next
> release require this version, so if you have issues building
> zeromq-2.1.x latest then let me know so I can work with that.

Ok, I will test the PHP part.

loïc

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
Daniel Huckstep
Date:
2011-02-09 @ 04:55
I had been using zmq 2.1.x and the problem I encountered was ctrl+c
didn't work, and if I remember right it would kind of die and stop
serving requests when the handler was shut down.

- Daniel

On Tuesday, February 8, 2011, Zed A. Shaw <zedshaw@zedshaw.com> wrote:
> Hey Everyone,
>
> After much digging I'm finding that the bug with 100% CPU will be fixed
> by making Mongrel2 depend on zeromq-2.1.x.  I'm going to make the next
> release require this version, so if you have issues building
> zeromq-2.1.x latest then let me know so I can work with that.
>
> Thanks.
>
> --
> Zed A. Shaw
> http://zedshaw.com/
>

Re: [mongrel2] Get Ready For zeromq-2.1.x required

From:
Zed A. Shaw
Date:
2011-02-10 @ 00:26
On Tue, Feb 08, 2011 at 09:55:06PM -0700, Daniel Huckstep wrote:
> I had been using zmq 2.1.x and the problem I encountered was ctrl+c
> didn't work, and if I remember right it would kind of die and stop
> serving requests when the handler was shut down.

Ahhh, that's the one I couldn't remember.  Thanks.

-- 
Zed A. Shaw
http://zedshaw.com/