[rabbitmq-discuss] exceptions on fast opening a number of connections / exception on TCP connection

Marcin Krol mrkafk at gmail.com
Sat Jan 29 18:18:39 GMT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I wrote a "stress test" function that (relatively) quickly does the
following: it creates a number of threads that open a new connection to
Rabbit, do RPC call over Rabbit, close the connection, sleep some
milliseconds and iterate again.

I'm getting following exceptions in Rabbit log:

=ERROR REPORT==== 29-Jan-2011::18:06:04 ===
exception on TCP connection <0.22244.4> from 10.0.0.234:54501
{inet_error,enomem}

=WARNING REPORT==== 29-Jan-2011::18:06:07 ===
exception on TCP connection <0.22240.4> from 10.0.0.234:54500
connection_closed_abruptly


pika throws following exception:

Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "./rc_mt2.py", line 167, in run
    self.testfun(*self.args, **self.kwargs)
  File "./rc_mt2.py", line 176, in rpc_testcall
    rc = RPCClient(node, servnum, rdonly)
  File "./rc_mt2.py", line 66, in __init__
    self.setup_conn(self.node)
  File "./rc_mt2.py", line 82, in setup_conn
    self.chan = self.conn.channel()
  File "/usr/local/bin/src/pika/pika/connection.py", line 385, in channel
    return channel.Channel(channel.ChannelHandler(self))
  File "/usr/local/bin/src/pika/pika/channel.py", line 205, in __init__
    self.handler._rpc(spec.Channel.Open(), [spec.Channel.OpenOk])
  File "/usr/local/bin/src/pika/pika/channel.py", line 187, in _rpc
    return self.connection._rpc(self.channel_number, method,
acceptable_replies)
  File "/usr/local/bin/src/pika/pika/connection.py", line 324, in _rpc
    channel = self._ensure_channel(channel_number)
  File "/usr/local/bin/src/pika/pika/connection.py", line 287, in
_ensure_channel
    raise ConnectionClosed(self.connection_close)
ConnectionClosed: Connection.Close(class_id = 0, method_id = 0,
reply_code = 0, reply_text = 'Socket closed')


If I add some time.sleep between the calls, the problem disappears (see
class TestThread and function stress_test in code below), but that's
kind of not the point, right?


Code:

http://pastie.org/pastes/1509383/text




- --

Regards,
mk

- --
Premature optimization is the root of all fun.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNRFn+AAoJEFMgHzhQQ7hOQ3AH/0ydNs1RRTsCAi4Cx9stPDuA
r3OMWnW1/scq6WcqpswIZTCe7a/2pAu/UbDkPgZxRPb0/pclqxAOwGud/Uij6ivq
63B8kuAZKVsXqHnel2ED/yGXRkm65ot0/wASRZR+38abUhMC88tvLP4XinqF9hnt
umCxMiF4tPUDspj7d1MF0Bwk9RjqT0rnmPHfNsrO10P4Ob8Ithm53rknfn3tHYNu
c8WeuzMVS+wth4SMQilqqyzVESy8Gpr8k9Ghn1GuEAhQrFzDE4+q960jbbhaKuH+
1KY4XKYMR1jDn+8C1BPm1eSbANGetpZb5gCcxHMRhtIJjOhEXX628dFArtinlls=
=uc7b
-----END PGP SIGNATURE-----


More information about the rabbitmq-discuss mailing list