I\'ve been struggling with an HTTP timeout issue recently. After more than one month of investigation I\'m quite sure that it is caused by bad HTTP persistent connections. Detai
After 2 weeks of research, I can give answers to question 3 and 4:
nginx
's persistent connection timeout is set to 5s on server, which should not be the cause. Server engineers found those timed-out requests are actually normally received and responded. So it is more likely a client side issue. Since I have a minimal reproducible code to rule out my code as the cause, the cause should be in iOS.CFNetwork
. Higher level API such as NSURLConnection
or NSURLSession
's Connection
header will be overwritten by system.