Hitting low level network connection limit

Originator:jasongregori
Number:rdar://12702512 Date Originated:14-Nov-2012 12:31 PM
Status:Behaves Correctly Resolved:Yes
Product:iPhone SDK Product Version:6.0
Classification: Reproducible:Yes
 
14-Nov-2012 12:31 PM Jason Gregori:
Summary:
We're not able to start any new HTTP network connections if we have 5 running connections to a very slow HTTP URL. In code, the new NSURLConnection's appear to have started. On Charles, I can't see any network connection actually go out until the slow ones finish. We're using Charles to see the network connections and artificially slow some of them down. I run into this limit on the simulator in iOS 5.1 and 6.0.

Steps to Reproduce:
1. Create and start 5 NSURLConnections to a very slow HTTP URL (something that will take minutes to return). This connections may have different paths but must have the same domain. (We used to Charles to throttle the connections).
2. Create and start an NSURLConnection to any other HTTP URL.

Expected Results:
I expect the new connection to return from start right away. I expect the connection to go out right away and to be able to see it on Charles.

Actual Results:
The new connection does return from start right away. The new connection appears to wait until the slow ones have returned before actually going out into the world. I don't see it on Charles until then.

Regression:
If I change the slow URL to HTTPS, other connections can start fine while the slow ones are running. I would also like to know why this is the case.


14-Nov-2012 05:40 PM Jason Gregori:
I realized that the 5 slow connections do not have to be on the same domain, they can be on different domains.




10-Jan-2013 11:25 AM Apple Developer Bug Reporting Team :
Engineering has determined that this issue behaves as intended based on the following information:

This is the effect of our NSURLConnection connection cache. It is expected. We expect to address this type of configuration with new API.




10-Jan-2013 12:49 PM Jason Gregori:
Thanks for the response!

Can you tell me some specifics about this limit? Is it always 5 connections? Or does it vary depending on if you're using wifi, edge, 3g, or LTE?




15-Jan-2013 09:13 AM Apple Developer Bug Reporting Team :
Engineering has determined that this issue behaves as intended based on the following information:

Unfortunately, we can't give details about the connection limit behavior.

User agents in general (Chrome, Firefox, Safari) use six simultaneous TCP connections per hostname, with potential one-offs.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!