iOS17 only issue - NSURLSession failing with "No Space Left on Device"

Hi All,

Our app is failing for several server requests with the below error

Task <C7BDDB06-6B6A-40B6-9F5D-D70322D36506>.<1> finished with error [28] Error Domain=NSPOSIXErrorDomain Code=28 "No space left on device" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <C7BDDB06-6B6A-40B6-9F5D-D70322D36506>.<1>, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=28, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <C7BDDB06-6B6A-40B6-9F5D-D70322D36506>.<1>" ), _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11], ipv4, ipv6, dns}

  • The issue is happening only on iOS17(~10GB space is left on the iPhone11 we are using. We built the app using Xcode15).
  • Our app is working fine on iOS16 and iOS15. The issue only happens on the latest iOS.
  • We are using AFNetworking for all our API calls. AFNetworking doesn't use singleton class for instantiation and everytime a new session is getting created. However we are surprised that this is all working fine till iOS16.

Could someone please let us know what is the root cause for this?

Thanks.

and everytime a new session is getting created

Are you making many many requests that are leaving lingering connections? Thats what this error typically means. You might want to track this with Instruments (using Network trace template) and see how many connections are open when this happens.

Also, is usually best practice to create a single session, or two, that you run like requests through so you can take advantage of network performance capabilities like connection reuse, caching, and generally faster setup time.

iOS17 only issue - NSURLSession failing with "No Space Left on Device"
 
 
Q