[-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."

Keep getting this intermittently, request never reaching server. some users getting it quite often



Could not figure out the reason for failure.
Thanks for including the log. The key part of this log is:

Code Block text
default 19:18:52.607239+0800 MyApp tcp_input [C214.1:3] flags=[F.] seq=3495390574, ack=4177775133, win=1622 state=ESTABLISHED rcv_nxt=3495390574, snd_una=4177775133
default 19:18:52.607424+0800 MyApp nw_protocol_tcp_log_summary [C214.1:3]
[3C12295A-35A8-4F14-8B19-04EB7B9DE584 <private>:56340<-><private>:443]
Init: 1, Conn_Time: 52.792ms, Syn's: 1, WR_T: 0/0, RD_T: 0/0, TFO: 0/0/0, ECN: 0/1/1, TS: 1
RTT_Cache: process, rtt_upd: 6, rtt: 42.093ms, rtt_var: 10.812ms rtt_nc: 43.218ms, rtt_var_nc: 15.687ms
default 19:18:52.607543+0800 MyApp nw_protocol_boringssl_input_finished(1700) [C214.1:2][0x14f454150] state: 2
default 19:18:52.607606+0800 MyApp Connection 214: read-side closed
default 19:18:52.607666+0800 MyApp Connection 214: is being canceled


Your connection is set up here for 52 seconds. However, take a look at the RTT_Cache stats. Out of the ~52 seconds ~42/43 seconds of it was round trip time setting up your connection before your endpoint closed the connection on the read side. This is a strong indication that you are suffering from very high latency between your device and server. The first thing I would do here is try and dial down the latency on your connection, as that is what looks to be the issue on the surface.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
[-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."
 
 
Q