Yes I am using one connection per thread. It works well, but I'd say once every day this error pops up. The messaging performed is not very high intensity so I don't think it is a performance issue.<div><br></div><div>
I have attached the sender thread code. The code is very straight forward, pretty much taken straight from the pika website. The ioloop is started in run, and then the main thread will call the send function to send messages.</div>
<div><br></div><div>I am going to do some digging on my end to try to catch the error upstream from where I catch it now. <br><br><div class="gmail_quote">On Sat, Jun 30, 2012 at 2:54 AM, Gavin M. Roy <span dir="ltr"><<a href="mailto:gmr@myyearbook.com" target="_blank">gmr@myyearbook.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Unless you're using a connection per thread, I'd not use threads. If you want to create a simple example recreating the issue I can try and track it down.
</div><div><br></div><div>Gavin</div><div><div class="h5">
<div></div>
<p style="color:#a0a0a8">On Friday, June 29, 2012 at 2:49 PM, Ask Solem wrote:</p>
</div></div><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
<span><div><div><div><div class="h5"><div><br></div><div>On 25 Jun 2012, at 10:18, c00kiemonster wrote:</div><div><br></div><blockquote type="cite"><div><div>I have a server script running three threads. One main thread with the inner core of the server instance, and then one receiver thread, and one sender thread. The receiver thread has one asynchronous pika connection receiving messages, and the sender thread has another asynchronous pika connection sending messages. This server instance is running just fine, but here and there this error pops up, and after the error comes write buffer exceeded warnings. At this point I simply restart the server script and everything is fine again.</div>
<div><br></div><div>How can I track this issue down? It's not easy to replicate, usually it happens every second day or so. I guess the question is actually two fold. First, looking in the base_connection.py file on line 106, it seems that the error variable passed to the _handle_error is None which makes it problematic to get the error_code. At this point in the code it seems odd for error to be None, but on line 137 error has a default value of None. So the first thing is to try to figure out whether the error is a proper error, or if it's just a bug somewhere in the event handling. Second, if it turns out to be a proper error, how can I debug to see which message / event triggered the error? Is there any way that I can see inspect the traffic to try to find the bad message / event?</div>
</div></blockquote><div><br></div><div>Looks like a bug in pika to me, maybe you should open up an issue</div><div>at <a href="https://github.com/pika/pika/issues" target="_blank">https://github.com/pika/pika/issues</a></div>
<div><br></div><div>This looks hard to track down indeed, but in general you should probably expect</div><div>that such errors can happen, and retry the operation if it does.</div><div><br></div><div>pika should raise some connection related error if there is no error code,</div>
<div>so that you can depend on catching some other exception than TypeError.</div></div></div><div>_______________________________________________</div><div>rabbitmq-discuss mailing list</div><div><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a></div>
<div><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>
</blockquote></div><br></div>