Hello All,

I am trying to send 1million messages into the message broker queue. I've
observed a weird error in sending these messages. After sending 16366
messages, I am getting a BrokerUnrechableException.

Can someone tell me what is the reason for this exception.

Thanks in advance.
--
View this message in context: http://old.nabble.com/BrokerUnrechableException-after-sending-16366-messages-tp32695317p32695317.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

Search Discussions

  • Simon MacMullen at Oct 21, 2011 at 11:29 am

    On 21/10/11 11:15, pavuuu wrote:
    I am trying to send 1million messages into the message broker queue. I've
    observed a weird error in sending these messages. After sending 16366
    messages, I am getting a BrokerUnrechableException.

    Can someone tell me what is the reason for this exception.
    BrokerUnreachableException means that the broker is unreachable. It is
    only ever thrown while trying to initially connect to the broker. Look
    in the ConnectionErrors field to see why connection failed.

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, VMware
  • James Carr at Oct 21, 2011 at 3:14 pm
    One "newb" mistake I often see when devs are initially testing out our
    dev cluster is they open a connection for each message they send
    rather than opening one connection and re-using it. This will quickly
    use up all the connections on the box and rabbitmq will begin refusing
    additional requests to connect.

    Once you have one connection and multiplex multiple channels, you
    shouldn't see such problems. We've pushed upwards of 10,000 messges
    per second so far on a single box and it hasn't missed a beat. :)

    Thanks,
    James

    On Fri, Oct 21, 2011 at 6:29 AM, Simon MacMullen wrote:
    On 21/10/11 11:15, pavuuu wrote:

    I am trying to send 1million messages into the message broker queue. I've
    observed a weird error in sending these messages. After sending 16366
    messages, I am getting a BrokerUnrechableException.

    Can someone tell me what is the reason for this exception.
    BrokerUnreachableException means that the broker is unreachable. It is only
    ever thrown while trying to initially connect to the broker. Look in the
    ConnectionErrors field to see why connection failed.

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, VMware
    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
  • Simon MacMullen at Oct 21, 2011 at 3:22 pm

    On 21/10/11 16:14, James Carr wrote:
    One "newb" mistake I often see when devs are initially testing out our
    dev cluster is they open a connection for each message they send
    rather than opening one connection and re-using it. This will quickly
    use up all the connections on the box and rabbitmq will begin refusing
    additional requests to connect.
    You should be fine of course as long as you are *closing* those
    connections too. RabbitMQ will only refuse connections when you have too
    many active ones.

    But.

    If you churn through connections at a frantic rate, you can get into a
    state where the entire *client* box can't make outgoing connections for
    a while, as all your ports in the ephemeral port range still have the
    remains of an old connection sitting there in the TCP_WAIT state.

    If you run into this it's usually a sign that you should be a bit more
    economical with connections (to put it mildly), but on Linux at least
    you can work around it with:

    # echo "1" >/proc/sys/net/ipv4/tcp_tw_reuse
    # echo "1" >/proc/sys/net/ipv4/tcp_tw_recycle

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, VMware
  • Pavuuu at Oct 24, 2011 at 6:53 am
    Reusing the open connections on client side solved my issue.

    Thanks guys... :)

    Does it mean that server doesn't close the connection immediately after it
    has been used ??


    Simon MacMullen-2 wrote:
    On 21/10/11 16:14, James Carr wrote:
    One "newb" mistake I often see when devs are initially testing out our
    dev cluster is they open a connection for each message they send
    rather than opening one connection and re-using it. This will quickly
    use up all the connections on the box and rabbitmq will begin refusing
    additional requests to connect.
    You should be fine of course as long as you are *closing* those
    connections too. RabbitMQ will only refuse connections when you have too
    many active ones.

    But.

    If you churn through connections at a frantic rate, you can get into a
    state where the entire *client* box can't make outgoing connections for
    a while, as all your ports in the ephemeral port range still have the
    remains of an old connection sitting there in the TCP_WAIT state.

    If you run into this it's usually a sign that you should be a bit more
    economical with connections (to put it mildly), but on Linux at least
    you can work around it with:

    # echo "1" >/proc/sys/net/ipv4/tcp_tw_reuse
    # echo "1" >/proc/sys/net/ipv4/tcp_tw_recycle

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, VMware
    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
    --
    View this message in context: http://old.nabble.com/BrokerUnrechableException-after-sending-16366-messages-tp32695317p32708315.html
    Sent from the RabbitMQ mailing list archive at Nabble.com.
  • Simon MacMullen at Oct 24, 2011 at 9:35 am

    On 24/10/11 07:53, pavuuu wrote:
    Does it mean that server doesn't close the connection immediately after it
    has been used ??
    It will. But check the TIME-WAIT thing. (Oops, said TCP_WAIT earlier, typo).

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, VMware

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedOct 21, '11 at 10:15a
activeOct 24, '11 at 9:35a
posts6
users3
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase