[rabbitmq-discuss] Error: RabbitMQ.Client.ConnectionFactory.cs - "Only one usage of each socket address (protocol/network address/port) is normally permitted"

Tony Garnock-Jones tonyg at lshift.net
Tue Sep 1 12:10:08 BST 2009


Patrick Kenney wrote:
> seemed to closely resemble the condition, as I am sending 4000 copies of
> the same message to the following method...

Your operating system is probably running out of sockets. Try holding a
single connection open and reusing it for all the deliveries, rather
than opening a connection for each delivery. Connections are relatively
heavyweight compared to calls to BasicPublish.

> I am thinking I am hitting some kind of configurable threshold in the
> RabbitMQ Client  and or RabbitMQ ServiceModel... but have been unable
> thus far to pin it down...

It is more likely to be an operating system (or TCP, depending on how
you look at it) limitation. Neither the C# client, the WCF binding, nor
the RabbitMQ server have any preconfigured limitations of this kind.

> Another interesting thing is that this exact code works unchanged on a
> much older, slower Pentium IV 2ghz, 2gig ram on windows xp pro vs.
> windows server 2003 enterprise  sp2... quad core xeon, 4gig, etc...

If it is socket exhaustion you're seeing, one possible explanation for
the slower machine working better is that it gives the TCP timeouts
longer to run, so sockets are getting recycled "faster" from the
point-of-view of the slower socket-requiring code.

Regards,
  Tony
-- 
 [][][] Tony Garnock-Jones     | Mob: +44 (0)7905 974 211
   [][] LShift Ltd             | Tel: +44 (0)20 7729 7060
 []  [] http://www.lshift.net/ | Email: tonyg at lshift.net




More information about the rabbitmq-discuss mailing list