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

SSL Auth Get a cpu leak with 40k request/s #267

Open
Minicriss opened this issue Jul 15, 2019 · 2 comments
Open

SSL Auth Get a cpu leak with 40k request/s #267

Minicriss opened this issue Jul 15, 2019 · 2 comments

Comments

@Minicriss
Copy link

Hello,

i have an big site where i implemented the websocket for do any action.

The problem was when i get more new connection to my websocket servers and with the analyzer of visual studio, i saw that the problem was on SocketWrapper.Authenticate Method.

Can u check if u found any leak of cpu in this method?

I can give u an access to the dev server with live test on the site.

Thanks.

@Minicriss
Copy link
Author

I found acpu leak on the acception of connection.

If you get a lot of connections at the same time, "RequestParser Parse -> Match match = _regex.Match(body);" creates a cpu leak.

The pattern of the regex is not good.

Now i'm using it -> private const string pattern = @"^(?[^\s]+)\s(?[^\s]+)\sHTTP/1.1\r\n" + // request line
@"((?<field_name>[^:\r\n]+):(?([^\r\n])\s)(?<field_value>[^\r\n])\r\n)+";

Pls check it.

Cya

@statianzo
Copy link
Owner

@Minicriss could you see how this performs for you? #210

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