---
title: "Discussion on \"The localhost trap: a 10-second database connection on Windows\" | Hashnode"
description: "Discussion on \"The localhost trap: a 10-second database connection on Windows\". On Windows, localhost resolves to IPv6 first. If Docker publishes on IPv4 only, every Postgres connection waits 10 seconds. One word fixes it."
url: "https://hashnode.com/posts/the-localhost-trap-a-10-second-database-connection-on-windows/6a677d75e28fc3eeef11a382"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The localhost trap: a 10-second database connection on Windows](https://skucherenko.hashnode.dev/the-localhost-trap-a-10-second-database-connection-on-windows?utm_source=hashnode&utm_medium=feed)

On Windows, localhost resolves to IPv6 first. If Docker publishes on IPv4 only, every Postgres connection waits 10 seconds. One word fixes it.

Jul 27 · 5 min read · skucherenko.hashnode.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#python](https://hashnode.com/tag/python)
-   [#trap](https://hashnode.com/tag/trap)

## Written by

[Serhiy Kucherenko](https://hashnode.com/@skucherenko)

@skucherenko · Barcelona, Spain

  
[View profile](https://hashnode.com/@skucherenko)

Software architect building AI systems

Software architect. 10 years of production systems. Now building AI systems with citations, evals, and a written reason for every decision.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
