gota icon indicating copy to clipboard operation
gota copied to clipboard

[BUG] Performance issue

Open lars18th opened this issue 8 years ago • 2 comments

Hi,

With the last release (v0.0.1-Beta3) when errors appear in the console (using WARN debug) then the CPU goes up to 100%.

I suggest to close the thread/tunnel/connection when a fatal error appears in the protocol (that is not when a simple error in the messages appears, but when is connection fails).

Here the client log when the CPU is at 100%:

ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1441, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1439, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1441, dropped.
ERRO[23136] CM: Connection didn't exist, client id: 2594778617, connection id: 1440, dropped.
ERRO[23144] CM: Connection didn't exist, client id: 2594778617, connection id: 1326, dropped.
ERRO[23177] CM: Connection didn't exist, client id: 2594778617, connection id: 1403, dropped.
ERRO[23177] CM: Connection didn't exist, client id: 2594778617, connection id: 1404, dropped.
ERRO[23180] CM: Connection didn't exist, client id: 2594778617, connection id: 1408, dropped.
ERRO[23190] CM: Connection didn't exist, client id: 2594778617, connection id: 1327, dropped.
ERRO[23190] CM: Connection didn't exist, client id: 2594778617, connection id: 1328, dropped.
ERRO[23386] CM: Connection didn't exist, client id: 2594778617, connection id: 1443, dropped.
ERRO[23389] CM: Connection didn't exist, client id: 2594778617, connection id: 1324, dropped.
ERRO[23477] CM: Connection didn't exist, client id: 2594778617, connection id: 1448, dropped.
ERRO[23483] CM: Connection didn't exist, client id: 2594778617, connection id: 1445, dropped.
ERRO[23483] CM: Connection didn't exist, client id: 2594778617, connection id: 1446, dropped.
ERRO[23686] CM: Connection didn't exist, client id: 2594778617, connection id: 1450, dropped.
ERRO[24169] CM: Connection didn't exist, client id: 2594778617, connection id: 1256, dropped.

I hope this helps.

lars18th avatar Aug 29 '17 19:08 lars18th

I can not reproduce those error.

Can you provide the debug log?

Many thanks!

jim3ma avatar Aug 30 '17 06:08 jim3ma

Hi @jim3ma ,

This is the full log (warn level) over the last lines... Two comments:

  1. This is with the last release, so if you use the last commit perhaps the problem is solved.

  2. These messages appear when the client initiates a lot of connections (is a web proxy), and when some of these connections are killed (not closed)... Or this is I think! When I use only one connection (for example with a SSH tunnel over the gota multi-link) I don't see any trouble. Even if I redirect the same proxy connection over the SSH tunnel. So, I imagine that the trouble is with not-well-closed sockets.

In any case, I can prepare a more extensive log. However, please, I suggest that you implement the function #8. This will simplifies the testing as I can tunnel two sockets: one to the webserver and one to the SSH server.

Thanks to you!

lars18th avatar Aug 30 '17 10:08 lars18th