Sendgrid-csharp: Getting address already in use from the /v3/mail/send endpoint

Created on 3 May 2019  路  5Comments  路  Source: sendgrid/sendgrid-csharp

Issue Summary

In our .net core project we sometimes get a 'address already in use error' when using the SendGridClient.

Steps to Reproduce

we load the in a service that is loaded via dependency injection (transient).
After some time we get the 'address already in use' error message and non of our messages are being sent anymore.

We think it is coming from httpclient.

Technical details:

  • sendgrid-csharp Version: 9.10.0
  • Platform ASP.NET core
  • .NET Version: 2.2
non-library issue

Most helpful comment

Thank you for the reply.

We are running multiple instances of the application in kubernetes pods using docker (Multiple pods each having 1 instance).

After searching online we found multiple people having the same problem when using .net core 2.2. Currently we are testing with .net core 2.1

We only have this error message: address already in use

All 5 comments

Hello @RobinSoenen,

Thanks for taking the time to report this. I have a few questions:

  • Are you running multiple instances of your application?
  • What leads you to believe the error is coming from httpclient?
  • Do you have any other error messages or logs?

With Best Regards,

Elmer

Thank you for the reply.

We are running multiple instances of the application in kubernetes pods using docker (Multiple pods each having 1 instance).

After searching online we found multiple people having the same problem when using .net core 2.2. Currently we are testing with .net core 2.1

We only have this error message: address already in use

Hello @RobinSoenen,

It does not appear that this is an issue with this SDK, rather, it looks to be a networking configuration issue. That said, I think this issue requires further investigation to be sure, so I will leave it open for further review.

With Best Regards,

Elmer

I am seeing this as well. We are also running our application in K8S we are using the dotnet core nuget package 9.10.0

Lots of discussions about this issue here (and other linked issues): https://github.com/dotnet/runtime/issues/29327

My understanding: this was breaking and introduced in .NET Core 2.1, it was fixed in 3.x, and it will not be (or has not been) back-ported to v2.

Closing this as a non-library issue.

Was this page helpful?
0 / 5 - 0 ratings