<font face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);">Hi All,</font><div><font face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);"><br></font></div><div><font face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);">Server version: 3.0.4</font></div><div><font face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);">.NET client version: 3.0.4</font></div><div><font face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);"><br></font></div><div><font face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);"><font color="#000000">I have had a problem on my Production servers this week where it looks like the call to CreateModel on IConnection is not thread safe, despite the documentation indicating that the entire IConnection should be thread safe. My application runs a single shared connection with somewhere&nbsp;in the region of 200-400 threads which will be creating models for at least 1 consumer and many publishers per thread. It looks like we had a small network&nbsp;hiccup&nbsp;and the connection reset, prompting all of the publishers/consumers to request new models at the same time. There is a very high chance that there will be threading clashes in this circumstance. The symptom after a threading clash is that all current requests for Connection.CreateModel() will throw an exception with the following error:</font><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">RabbitMQ.Client.Exceptions.OperationInterruptedException: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=503, text="COMMAND_INVALID - second 'channel.open' seen", classId=20, methodId=10, cause=</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">And any subsequent requests to IConnection.CreateModel() on that connection instance indefinitely hang.&nbsp;</span><font color="#000000">I have managed to resolve this for now by adding locking around channel creation.</font><br></font></div><div><font color="#000000" face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);"><br></font></div><div><font color="#000000" face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);">I have attached an NUnit test file which recreates this problem. The test case that uses locking will pass and the test without locking will indefinitely hang after it tries to create a channel on line 62 (at which point all of the threads are now hanging requesting a model).</font></div><div><font color="#000000" face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);"><br></font></div><div><font color="#000000" face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);">Has anyone seen any problems like this before?</font></div><div><font color="#000000" face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);"><br></font></div><div><font color="#000000" face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);">Cheers,</font></div><div><font color="#000000" face="arial, sans-serif" size="2" style="background-color: rgb(255, 255, 255);">Chris</font></div>