MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: Sporadic long timeouts connecting to a remote server

Open
#5,484 0 comments 0 reactions 1 assignee View on GitHub

@prija-microsoft is already working on this.

Since May 20, 2026.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

2026-01-04_18-11-41_0.log_net copy.json

What happened?

Hi,
We are using webview2 and the app is starting the window with NavigateWithWebResourceRequest.
We noticed a long latency in some invocations between the time the navigation is starting and the time we actually see the request in the server.

After capturing net logs, it seems that the root cause is that in some cases we get timeouts for some of the availability zones of the gateway, ~20 seconds each timeout and then succeeding on the second/third endpoint, resulting in a total latency of 30/50 seconds.
The attached net log shows two timeouts and success on the third try.

t=   25 [st=    0] +CONNECT_JOB  [dt=46487]
t=   25 [st=    0]    SOCKET_POOL_CONNECT_JOB_CREATED
                      --> backup_job = false
                      --> group_id = "https://api.***<https://***.red same_site>"
t=   25 [st=    0]   +SSL_CONNECT_JOB_CONNECT  [dt=46487]
t=   25 [st=    0]     +TRANSPORT_CONNECT_JOB_CONNECT  [dt=46487]
t=   25 [st=    0]       +HOST_RESOLVER_MANAGER_REQUEST  [dt=0]
                          --> allow_cached_response = true
                          --> dns_query_type = "UNSPECIFIED"
                          --> host = "https://api.***"
                          --> is_speculative = false
                          --> network_anonymization_key = "https://*** same_site"
                          --> secure_dns_policy = 0
t=   25 [st=    0]          HOST_RESOLVER_MANAGER_IPV6_REACHABILITY_CHECK
                            --> cached = true
                            --> ipv6_available = false
t=   25 [st=    0]          HOST_RESOLVER_MANAGER_TASK_SEQUENCE_CREATED
                            --> tasks = [
                                  4,
                                  9,
                                  1,
                                  0
                                ]
t=   25 [st=    0]          HOST_RESOLVER_MANAGER_CACHE_HIT
                            --> results = {
                                  "aliases": [
                                    "api.***"
                                  ],
                                  "canonical_names": [
                                    "api.***"
                                  ],
                                  "endpoint_metadatas": [],
                                  "expiration": "13412023962652705",
                                  "host_ports": [],
                                  "hostname_results": [],
                                  "ip_endpoints": [
                                    {
                                      "endpoint_address": "34.215.246.252",
                                      "endpoint_port": 0
                                    },
                                    {
                                      "endpoint_address": "34.217.150.0",
                                      "endpoint_port": 0
                                    },
                                    {
                                      "endpoint_address": "34.210.38.90",
                                      "endpoint_port": 0
                                    }
                                  ],
                                  "name_resolution_handle": 0,
                                  "text_records": []
                                }
t=   25 [st=    0]          HOST_RESOLVER_MANAGER_CACHE_HIT
                            --> results = {
                                  "aliases": [
                                    "api.***"
                                  ],
                                  "canonical_names": [
                                    "api.***"
                                  ],
                                  "endpoint_metadatas": [],
                                  "expiration": "13412023962652705",
                                  "host_ports": [],
                                  "hostname_results": [],
                                  "ip_endpoints": [
                                    {
                                      "endpoint_address": "34.215.246.252",
                                      "endpoint_port": 0
                                    },
                                    {
                                      "endpoint_address": "34.217.150.0",
                                      "endpoint_port": 0
                                    },
                                    {
                                      "endpoint_address": "34.210.38.90",
                                      "endpoint_port": 0
                                    }
                                  ],
                                  "name_resolution_handle": 0,
                                  "text_records": []
                                }
t=   25 [st=    0]       -HOST_RESOLVER_MANAGER_REQUEST
t=   25 [st=    0]        TRANSPORT_CONNECT_JOB_CONNECT_ATTEMPT
                          --> address = "34.215.246.252:443"
                          --> source_dependency = 48 (SOCKET)
t=21030 [st=21005]        TRANSPORT_CONNECT_JOB_CONNECT_ATTEMPT
                          --> address = "34.217.150.0:443"
                          --> source_dependency = 67 (SOCKET)
t=42030 [st=42005]        TRANSPORT_CONNECT_JOB_CONNECT_ATTEMPT
                          --> address = "34.210.38.90:443"
                          --> source_dependency = 69 (SOCKET)
t=46512 [st=46487]     -TRANSPORT_CONNECT_JOB_CONNECT
                        --> net_error = -3 (ERR_ABORTED)
t=46512 [st=46487]   -SSL_CONNECT_JOB_CONNECT
                      --> net_error = -3 (ERR_ABORTED)
t=46512 [st=46487] -CONNECT_JOB
48: SOCKET

Start Time: 2026-01-04 20:11:42.652

t=   25 [st=    0] +SOCKET_ALIVE  [dt=21005]
                    --> source_dependency = 47 (SSL_CONNECT_JOB)
t=   25 [st=    0]   +TCP_CONNECT  [dt=21005]
                      --> address_list = [
                            "34.215.246.252:443"
                          ]
                      --> aliases = []
                      --> name_resolution_handle = 0
t=   25 [st=    0]     +TCP_CONNECT_ATTEMPT  [dt=21004]
                        --> address = "34.215.246.252:443"
t=21029 [st=21004]     -TCP_CONNECT_ATTEMPT
                        --> os_error = 10060
t=21030 [st=21005]      SOCKET_CLOSED
t=21030 [st=21005]   -TCP_CONNECT
                      --> net_error = -118 (ERR_CONNECTION_TIMED_OUT)
t=21030 [st=21005] -SOCKET_ALIVE
67: SOCKET

Start Time: 2026-01-04 20:12:03.657

t=21030 [st=    0] +SOCKET_ALIVE  [dt=21000]
                    --> source_dependency = 47 (SSL_CONNECT_JOB)
t=21030 [st=    0]   +TCP_CONNECT  [dt=21000]
                      --> address_list = [
                            "34.217.150.0:443"
                          ]
                      --> aliases = []
                      --> name_resolution_handle = 0
t=21030 [st=    0]     +TCP_CONNECT_ATTEMPT  [dt=21000]
                        --> address = "34.217.150.0:443"
t=42030 [st=21000]     -TCP_CONNECT_ATTEMPT
                        --> os_error = 10060
t=42030 [st=21000]      SOCKET_CLOSED
t=42030 [st=21000]   -TCP_CONNECT
                      --> net_error = -118 (ERR_CONNECTION_TIMED_OUT)
t=42030 [st=21000] -SOCKET_ALIVE
  1. Is there any runtime flag that can control timeout for that? We would like to make it shorter
  2. Is it possible to try all addresses in parallel? And not one by one?
  3. Any other runtime flag that can help with debug
Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

143.0.3650.96

SDK Version

1.0.2365.46

Framework

----Please select----

Operating System

Windows 11

OS Version

No response

Repro steps

This is reproduced in out private env on timeouts during TCP connect, it happens sporadically, so not sure how to reproduce for other users.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.