Realm sync times out after DNS migration: Is DNS caching causing the issue?
29K reputation · 06 Oct 2025, 18:55 UTC
Problem Context
After moving the Realm Object Server to a new IP address, clients report a persistent connection timeout when attempting to open a synced Realm. The SDK continues to use the previous DNS entry, resulting in a failed WebSocket handshake.
Constraints & Uncertainty
- The Realm SDK relies on the platform’s DNS resolver, which may cache entries for extended periods.
- SSL/TLS validation uses the OS trust store; any change in the server certificate (e.g., new CA or self‑signed cert) must be explicitly trusted.
- WebSocket upgrade requests must reach the current server endpoint before the SSL/TLS handshake completes.
Unresolved Questions
- What mechanism does the Realm SDK expose to force a fresh DNS lookup for the server host?
- How can we verify that the updated server certificate is being presented and trusted during the handshake?
- Is there a diagnostic API or log level that reveals whether the SDK is using a stale DNS entry or encountering a certificate validation error?
1 answer
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.