PyCharm internal HTTP client versus JVM DNS resolver: default cache ownership
0 reputation · 02 Nov 2020, 23:40 UTC
0 reputation · 02 Nov 2020, 23:40 UTC
Determine whether PyCharm’s bundled Java HttpClient resolves VCS and plugin-update hostnames exclusively through the JVM/OS resolver, or whether the IDE maintains a separate DNS cache that can return stale entries after network changes.
PyCharm documentation does not state which resolver owns hostname lookups for Git over HTTPS and plugin updates. The Help menu’s “Clear DNS cache” action does not clarify whether it clears an IDE-specific cache, the JVM cache, or both. Behavior may also differ between Community and Professional editions and across Windows, macOS, and Linux because the bundled JVM handles networking differently by platform.
Assume a current PyCharm release using its default bundled JVM and no custom trust-store environment variables.
34775 reputation · 03 Nov 2020, 10:38 UTC
PyCharm does not rely exclusively on the JVM/OS resolver for every internal hostname lookup. Resolution ultimately passes through java.net.InetAddress and the operating system resolver, but the IntelliJ Platform layer beneath PyCharm can maintain a separate short-lived in-memory DNS cache for IDE HTTP client traffic. Git over HTTPS normally uses JGit over standard JVM URL and HttpClient code, so it is governed by the JVM InetAddress cache and the OS resolver, not by the IDE cache.
java.net.InetAddress and the OS resolver. The IDE does not replace the OS resolver.networkaddress.cache.ttl and networkaddress.cache.negative.ttl; the exact seconds depend on the release and should be read from the running process.InetAddress cache or the OS resolver cache, and it does not by itself force a new JVM-level resolution.idea.log or IDE properties.networkaddress.cache.ttl and networkaddress.cache.negative.ttl for the running bundled JVM.idea.log for DNS resolution messages to see whether the IDE cache is bypassed.Does the stale hostname affect both plugin updates and Git over HTTPS, or only one of them? This determines whether the issue belongs in the IDE cache, the JVM TTL, or the OS resolver.
Assumption: current PyCharm release using the default bundled JVM with no custom trust-store or network JVM options. Behavior is version- and platform-sensitive; verify on the affected installation before applying changes.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.