[issue27906] Socket accept exhaustion during high TCP traffic

2017-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -933 ___ Python tracker ___ ___

[issue27906] Socket accept exhaustion during high TCP traffic

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +933 ___ Python tracker ___ ___

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-15 Thread STINNER Victor
STINNER Victor added the comment: Guido van Rossum: "Maybe with the new code it could log a message if it doesn't exit the loop via a break? Because that would mean the listen buffer is full. It would encourage people to configure a larger number." Hum, yes maybe. But I would suggest to only

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1dcfafed3cb0 by Yury Selivanov in branch '3.5': Issue #27906: Fix socket accept exhaustion during high TCP traffic. https://hg.python.org/cpython/rev/1dcfafed3cb0 New changeset 62948164ff94 by Yury Selivanov in branch '3.6': Merge 3.5 (issue

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-15 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe with the new code it could log a message if it doesn't exit the loop via a break? Because that would mean the listen buffer is full. It would encourage people to configure a larger number. -- ___ Python

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-15 Thread Yury Selivanov
Yury Selivanov added the comment: > > On the asyncio side, with debug turned on, we see nothing. > Does someone see a way to log a message in such case? Maybe only in debug > mode? I'm not sure we can do anything here. @kevinconway, did you try to find out if it's possible to log this

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-15 Thread STINNER Victor
STINNER Victor added the comment: > On the asyncio side, with debug turned on, we see nothing. Hum, I'm concerned by this issue. I would expect that in debug log, a log would be emitted. Maybe something like "accept queue saturated! we may probably loose incoming connections". Does someone

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-14 Thread Guido van Rossum
Guido van Rossum added the comment: (Of course I meant b2.) -- ___ Python tracker ___ ___ Python-bugs-list

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-14 Thread Yury Selivanov
Yury Selivanov added the comment: > @Yury, do you think you could get to this before b1 goes out? It's a pure > optimization (and a good one!). LGTM. Will commit tomorrow. -- assignee: -> yselivanov ___ Python tracker

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-14 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, we didn't get to this. @Yury, do you think you could get to this before b1 goes out? It's a pure optimization (and a good one!). -- ___ Python tracker

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: I'll try to get to this during the core dev sprint next week. -- ___ Python tracker ___

[issue27906] Socket accept exhaustion during high TCP traffic

2016-09-01 Thread kevinconway
kevinconway added the comment: Added a comment to the .accept() loop with a reference to the issue. -- Added file: http://bugs.python.org/file44321/multi-accept-3.patch ___ Python tracker

[issue27906] Socket accept exhaustion during high TCP traffic

2016-08-30 Thread kevinconway
kevinconway added the comment: I've added a unit test to the patch that asserts sock.accept() is called the appropriate number of times. Worth a note, I had to adjust one of the existing tests to account for the new backlog argument. There is a default value for the argument to preserve

[issue27906] Socket accept exhaustion during high TCP traffic

2016-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, the tests are often full of mocks, and I trust that the test suite you wrote verifies that this fixes the problem. The unit tests are more to ensure that future changes to the code won't accidentally break the code you wrote (which is why we should

[issue27906] Socket accept exhaustion during high TCP traffic

2016-08-30 Thread kevinconway
kevinconway added the comment: I'll dig into the existing asyncio unit tests and see what I can come up with. I'm not sure, yet, exactly what I might test for. The variables involved with reproducing the error are mostly environmental. CPU speed of the host, amount of CPU bound work happening

[issue27906] Socket accept exhaustion during high TCP traffic

2016-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks -- IIRC this was even brought up during asyncio's early implementation phase, but we didn't have enough experience to warrant the extra logic. It seems like now is the time to do this! I hope you won't need it for 3.4, because that version is out of

[issue27906] Socket accept exhaustion during high TCP traffic

2016-08-30 Thread kevinconway
kevinconway added the comment: Attaching the patch file -- keywords: +patch Added file: http://bugs.python.org/file44287/multi-accept.patch ___ Python tracker

[issue27906] Socket accept exhaustion during high TCP traffic

2016-08-30 Thread kevinconway
New submission from kevinconway: My organization noticed this issue after launching several asyncio services that would receive either a sustained high number of incoming connections or regular bursts of traffic. Our monitoring showed a loss of between 4% and 6% of all incoming requests. On