Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singleton HttpClient does not honor DNS changes as in case of failover #1865

Closed
rohankhandelwal opened this issue Mar 26, 2021 · 1 comment
Closed
Assignees
Labels
fix-checked-in Fix checked into main or preview, but not yet released. IoTSDK Tracks all IoT SDK issues across the board

Comments

@rohankhandelwal
Copy link
Member

Hi,
The Service SDK seem to be using a singleton httpclient and does not honor dns changes as when they happen in case of Failover of an IoT Hub.
This blog post explains in detail on how this can be addressed by appropriately setting ConnectionLeaseTimeout
http://byterot.blogspot.com/2016/07/singleton-httpclient-dns.html

  • OS, version, SKU and CPU architecture used:
  • Application's .NET Target Framework :
  • Device:
  • SDK version used:

Description of the issue:

Code sample exhibiting the issue:

Console log of the issue:

@github-actions github-actions bot added the IoTSDK Tracks all IoT SDK issues across the board label Mar 26, 2021
@drwill-ms drwill-ms self-assigned this Mar 29, 2021
timtay-microsoft added a commit that referenced this issue Mar 30, 2021
The singleton http clients in the service client never update to reflect any DNS changes unless this value is set to a non -1 value

#1865
timtay-microsoft added a commit that referenced this issue Apr 9, 2021
…timeout in Http service clients

Also fixes #1865 by making the default connection lease timeout no longer infinite
@timtay-microsoft timtay-microsoft added the fix-checked-in Fix checked into main or preview, but not yet released. label Apr 9, 2021
@timtay-microsoft
Copy link
Member

This issue has been fixed as of Microsoft.Azure.Devices 1.32.0, so I'm going to close this issue. Feel free to re-open this issue if you are still running into any issues here.

timstewartm pushed a commit to timstewartm/azure-iot-sdk-csharp that referenced this issue May 30, 2024
…n lease timeouts (Azure#1874)

Also fixes Azure#1865 by making the default connection lease timeout no longer infinite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix-checked-in Fix checked into main or preview, but not yet released. IoTSDK Tracks all IoT SDK issues across the board
Projects
None yet
Development

No branches or pull requests

3 participants