{
  "id": 6988874,
  "title": "The .NET HTTP Failure Nobody Sees Coming -Najeeb Ullah",
  "url": "https://urgent.news/2026/09/12/the-net-http-failure-nobody-sees-coming-najeeb-ullah",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-12T20:30:02.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/najeebullah/the-net-http-failure-nobody-sees-coming-najeeb-ullah-3g45"
  },
  "original_language": "en",
  "account": "In certain production scenarios, an ASP.NET Core application processing payments might suddenly stop calling external services. Symptoms include timeouts, latency increases, and intermittent request failures. Despite CPU, memory, and database appearing healthy on monitoring dashboards, the root cause often lies within the application's TCP connection management. The issue arises from repeatedly creating and disposing HttpClient instances, leading to exhaustion of operating system's ephemeral port range used for local source ports. When connections are closed, TCP enters TIME_WAIT state to protect against delayed packets, which can cause a shortage of available ports if connections are established faster than they can be recycled. This results in a high rate of connection failures and timeouts. The misunderstanding lies in believing that using HttpClient or implementing IHttpClientFactory resolves the issue. While these recommendations are valuable, they do not address the underlying problem. The true culprit is the creation of new connection pools for every request, rather than reusing existing ones. To mitigate this issue, developers should optimize TCP connection management by reusing HttpClient instances and considering DNS changes that may affect connection stability.",
  "summary": "Your CPU is fine. Your memory is fine. Your database is fine. So why did the application suddenly stop calling another service? There is a class of production failure that is particularly dangerous because your application metrics can look completely healthy while the application is already running out of a critical resource. The symptoms often look like this: outbound API calls start timing out…",
  "key_points": [
    "ASP.NET Core app stops calling external services in production",
    "Repeatedly creating/disposing HttpClient exhausts OS ephemeral ports",
    "Optimizing TCP connection management resolves issue"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}