[rabbitmq-discuss] RabbitMQ .NET deadlock after calling .CreateConnection

Andrius Norkaitis andrius.norkaitis at oryo.lt
Thu Jun 11 16:18:21 BST 2009


Any thoughts why this deadlocks may occur? The most problematic is that this deadlocks occurs rarely and at client's site... (after long monitoring it occurred on our machine too).

I have attached the source. Your help would be very appreciated.

Thanks.

Andrius


-----Original Message-----
From: Ryan Davis [mailto:ryan at acceleration.net]
Sent: Monday, June 08, 2009 5:21 PM
To: Andrius Norkaitis
Cc: rabbitmq-discuss at lists.rabbitmq.com
Subject: Re: [Spam] [rabbitmq-discuss] RabbitMQ .NET Client sometimes hangs up

Would it be possible to post your code?  I use the .NET client in a similar way, spawning many threads each calling CreateConnection.  I've simulated network problems by restarting my RabbitMQ server, and I see the .NET client throwing exceptions when it fails.

Thanks,

Ryan Davis
Acceleration.net
Director of Programming Services
2831 NW 41st street, suite B
Gainesville, FL 32606

Office: 352-335-6500 x 124
Fax: 352-335-6506



Andrius Norkaitis wrote:
> I think no. All rabbit code is in try/catch and nothing is logged in catch statement. Otherwise, if .net rabbit client method CreateConnection does some asynchronous stuff (haven't watch at a source deeply), errors may not be caught and in this case thread may halt, I think.
>
> -----Original Message-----
> From: Ryan Davis [mailto:ryan at acceleration.net]
> Sent: Monday, June 08, 2009 4:06 PM
> To: Andrius Norkaitis
> Cc: rabbitmq-discuss at lists.rabbitmq.com
> Subject: Re: [Spam] [rabbitmq-discuss] RabbitMQ .NET Client sometimes 
> hangs up
>
> Is the thread throwing an exception before it halts?
>
> Thanks,
>
> Ryan Davis
> Acceleration.net
> Director of Programming Services
> 2831 NW 41st street, suite B
> Gainesville, FL 32606
>
> Office: 352-335-6500 x 124
> Fax: 352-335-6506
>
>
>
> Andrius Norkaitis wrote:
>   
>> Hello,
>>
>> I can’t find the problem and how to fix it so your help would be very appreciated.
>>
>> Our .net client starts new thread which loops calling ConnectAndListen method (loop is for automatic reconnect). In ConnectAndListen method we create new connection and model, bind to queries and listen for messages ("foreach (BasicDeliverEventArgs ee in subscription)").
>>
>> Everything works like it has, but for sometimes unknown reason sometime client does not reconnect and hangs. It's not always and depends on network disturbances, so can’t easily debug. What I figured out, that thread halts after this statement is called: 
>>
>> using (conn = cf.CreateConnection(serverAddress))
>>
>>
>> Any thoughts what can cause it and how to fix it?
>>
>>
>> Best regards
>> Andrius
>>
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>   
>>     
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rabbit.cs
Url: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090611/75a7fdef/attachment.txt 


More information about the rabbitmq-discuss mailing list