I am kinda curious if you can put together some example code for the
problem.

I am hitting a single URL session with 10 concurrent requests driving thru
hundreds in a minute for small requests against the same backend. I
throttle things using an operation queue set to 10 current operations and
have a simple asynchronous friendly operation starting up the request and
finishing it self when the operation competes.

I have run up the concurrency as a test and not seen what you are reporting.

As others note it really isn't a good idea to attempt that many concurrent
requests in the same URL session or different session especially if hitting
the same server. Unless the server is returning data very very slowly with
no bandwidth limits between you and it you likely shouldn't have more then
a handful active at once.

-Shawn


On Tue, Nov 22, 2016 at 1:29 PM Rick Mann <[email protected]> wrote:


> On Nov 22, 2016, at 03:23 , Quinn The Eskimo! <[email protected]> wrote:
>
>
> On 22 Nov 2016, at 11:17, Rick Mann <[email protected]> wrote:
>
>> I tried setting it to 4, but I still get the problem.
>
> What happens if you don’t modify it at all?

Still get the problem.

FWIW, I'm also setting .httpShouldUsePipelining to true and
.timeoutIntervalForRequest to 3600 (necessary because the timeout isn't
reset for each request, but rather for the whole session). I commented out
all my adjustments and tried just the default URLSessionConfiguration,
still the same behavior.

• Aside: I was getting the default URLSessionConfiguration and setting
these properties. Should I be getting a copy of the default instead?

• I'm also worried about the frequent "A server with the specified hostname
could not be found" errors I get. Could that be the result of attempts at
DNS resolution failing because of too many open files, and being changed
into a not-found error? I also get "The Internet connection appears to be
offline".

In fact, all three errors are often found interspersed throughout.

• I don't understand why so many connections are opening, since I am
currently limiting it to 4 tasks per session. It seems they're not closing
after each use, but not getting re-used?

Thanks,

--
Rick Mann
[email protected]



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/shawnce%40gmail.com

This email sent to [email protected]
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to