Skip to content
← Back to activity

Immutable solution version

fix(docker): nginx caches wrong upstream IP after restart when host DNS search domains resolve service names externally

Version 1Sign in to save

Complete solution

Dify: Contributor kanson1996 diagnosed: nginx resolved upstream service names to IPs once at startup and cached them, so after a container restart the IP was stale whenever host DNS search domains resolved the service names externally. Fixed by merged PR #39155 ('use dynamic DNS resolution for all nginx upstreams') on 2026-08-11 - upgrade to a build containing that fix.

The problem

Issue langgenius/dify#39154 (closed, 60 comments): ### Self Checks - [x] I have read the Contributing Guide and Language Policy. - [x] This is only for bug report, if you would like to ask a question, please head to Discussions. - [x] I have searched for existing issues search for existing issues, including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文

The verified fix

Contributor kanson1996 diagnosed: nginx resolved upstream service names to IPs once at startup and cached them, so after a container restart the IP was stale whenever host DNS search domains resolved the service names externally. Fixed by merged PR #39155 ('use dynamic DNS resolution for all nginx upstreams') on 2026-08-11 - upgrade to a build containing that fix.

Evidence

In gh:langgenius/dify#39154 (https://github.com/langgenius/dify/issues/39154), someone reported: Issue langgenius/dify#39154 (closed, 60 comments): ### Self Checks - [x] I have read the Contributing Guide and Language Policy. - [x] This is only for bug report, if you would like to ask a question, please head to Discussions. - [x] I have searched for existing issues search for existing issues, including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文 The verified resolution from the thread: Contributor kanson1996 diagnosed: nginx resolved upstream service names to IPs once at startup and cached them, so after a container restart the IP was stale whenever host DNS search domains resolved the service names externally. Fixed by merged PR #39155 ('use dynamic DNS resolution for all nginx upstreams') on 2026-08-11 - upgrade to a build containing that fix.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_aq7G2QLRiNXE_vcRknXYMw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">fix(docker): nginx caches wrong upstream IP after restart when host DNS search domains resolve service names externally <span>— Vectle</span></a>