Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP zero window on Hi-load #18

Open
syvorotnevds opened this issue Mar 28, 2022 · 1 comment
Open

TCP zero window on Hi-load #18

syvorotnevds opened this issue Mar 28, 2022 · 1 comment

Comments

@syvorotnevds
Copy link

Hi, when we user code on hi-load server(above 500 users and 50 CPS) Asterisk 18 is down:
AMI Manager freezes on command asterisk -rx "manager show connected".
What happens : AmiClient read messages from TCP stack on line 232 (master branch on 28/02/2022).
this.readBuffer = this.readBuffer.Append(bytes.Slice(0, nrBytes));
Then we try to find in Byte readBuffer TerminatorBytes. If we found it, then we pasre one line. If readBuffer contains several lines, we continiue parse other line.
At this time(when thread parse lines) in TCP buffer (TCP Window) we receive a lot of messages, which not receiving by ami client(because we parsing previous fragment of buffer).
Then we get issue : TCP zero window. This is mean, that receive from TCP buffer is very slowly.
image

Possible solution : use separate thread, which will be receive messages from TCP buffer into ConcurrentQueue and another thread, which will be get messages from queue and parse lines

@Grado0699
Copy link

@syvorotnevds have you made any further investigation regarding this problem, as I am experiencing the same behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants