Azure / DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework
Other
4.09k stars 977 forks source link

Facing following issues randomly, using Dotnetty 0.4.6 along with Azure Protocol Gateway #358

Closed vivekbahl closed 6 years ago

vivekbahl commented 6 years ago

Hi, We are facing following issues (content pasted in attached jpg files) randomly while running a custom version of the Protocol Gateway, that uses Dotnetty (version 0.4.6.) -

we are using the following version of SDKs. along with a custome version of Azure Protocol gateway – Microsoft.Azure.Devices 1.2.4 Microsoft.Azure.Devices.Client 1.2.10 Microsoft.Azure.Devices.Shared 1.0.10 Microsoft.ServiceFabric 5.7.198 Microsoft.ServiceFabric.Services 2.7.198 WindowsAzure.Storage 7.2.0 DotNetty 0.4.6

These random issues start showing up usually after 2-3 hrs of Protocol Gateway code execution. Please help provide some pointers for understanding the root cause of these.

Thanks, Vivek Bahl image image image image image

StormHub commented 6 years ago

Is there any way to repro the issue just by using DotNetty ?

nayato commented 6 years ago

I believe it we've sorted it out now.


From: Johnny Z notifications@github.com Sent: Monday, February 26, 2018 4:33:11 PM To: Azure/DotNetty Cc: Subscribed Subject: Re: [Azure/DotNetty] Facing following issues randomly, using Dotnetty 0.4.6 along with Azure Protocol Gateway (#358)

Is there any way to repro the issue just by using DotNetty ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2FDotNetty%2Fissues%2F358%23issuecomment-368702512&data=04%7C01%7Cmgortman%40microsoft.com%7Ca61233ad18ae4629651308d57d79ae90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636552883935168599%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=ZjQbWbiDKVEXYps5Z%2FCvX1bewQI5pQyIFiuZ2QHPn9U%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAx7YVWaCGohoK8vNaKYVEWGRD5jC2lrks5tY01GgaJpZM4SBpTi&data=04%7C01%7Cmgortman%40microsoft.com%7Ca61233ad18ae4629651308d57d79ae90%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636552883935168599%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=FaqA1GILN2OWxR6KtXMApcjV3tTVuY%2FYth%2FTXr6t65g%3D&reserved=0.

vivekbahl2021 commented 6 years ago

Thanks Nayato, The issues were resolved by updating following in our version of MqttAdapter.cs, in Protocol Gateway code.

  1. removed the Usings clauses and converted to try-finally with “message?.Dispose()” statements. As it ensures that message ownership is properly maintained throughout the lifecycle of byte buffers and they are properly disposed in end, by the sendingClient.
  2. removed the configureAwait(false) as DotNetty requires, the continuations runs where they originated, and it ensures that all the work for a single connection is done on the same thread.