ibanmen
V2EX  ›  Docker

docker 容器内访问宿主机慢的问题

  •  
  •   ibanmen · Feb 26, 2025 · 1762 views
    This topic created in 506 days ago, the information mentioned may be changed or developed.

    最近遇到一个比较烦心的问题,pgsql 使用物理部署,应用部署在容器内,应用通过 docker0 访问宿主机 pgsql ,每次连接的建立的时间都超过 10s,各位友友,有什么好的排查方法吗?

    • 1 、在宿主机连接 pgsql(使用物理网卡) 时间 0.034s

    • 2 、在宿主机连接 pgsql(使用 docker0) 时间 10s

    • 3 、容器内连接 pgsql(使用 docker0) 时间 10s

    • 4 、容器内连接 pgsql(使用物理网卡) 时间 10s

    • 宿主机网卡如下

    • 宿主机路由信息

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3244 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 03:10 · PVG 11:10 · LAX 20:10 · JFK 23:10
    ♥ Do have faith in what you're doing.