> 
> Yep, I found that just after I sent my previous. Interesting, though a little 
> difficult to relate exactly to my crash. I guess tcp_connection_get_socket() 
> creates a file handle for the socket stream (?? guessing) and that's the one 
> tripping the EXC_GUARD.
> 
> Do you or anyone else know if there's some inherent limit to the number of 
> simultaneous sockets that can be opened? I'm supposing that there's a 1:1 
> correspondence between a NSURLSession and a socket, because of the 
> description against [NSURLSession resetWithCompletionHandler:] says:

Yes there is an inherent limit to the number of sockets which can be opened.    
It's limited by the number of filehandles you can have open which you fin by 
running ulimit -n and on my machine that gives 2560 when run from a shell (oh 
how things have changed!), so you're probably not running into that. 

I really can't decide whether the filehandle you're getting the exception on, 
254, is high or not. You have probably 50 sockets open but I have no idea how 
many filehandles a generic process 'just uses' in the course of being a generic 
process. Since OSX doesn't have a /proc filesystem, it's not that easy to tell. 

> 
> "This method empties all cookies, caches and credential stores, removes disk 
> files, flushes in-progress downloads to disk, and ensures that future 
> requests occur on a new socket"
> 
> This implies that there's a socket associated with the session.
> 
> Since I have also a 1:1 correspondence between my app's individual tasks and 
> NSURLSession, I'm opening 1 socket per task as my app starts. So around 50 in 
> my current test situation.
> 
> 
>> if you aren’t opening your own files/creating your own filehandles I suspect 
>> you have a bugreport in your future. 
>> 
>> You might also try a post in CoreOS on devforums or on the networking apple 
>> mail list as that’s where Quinn hangs out. 
> 
> 
> That sounds like a good thing to try.
> 
> --Graham
> 
> 


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to