Description
From @tomap on Gitter, if there is bad authentication information, connections keep getting opened at a rate of 4 per second and not being closed:
The problem is that in the background, the couchbaseclient will check the health of the connection with this method:
https://github.com/couchbase/couchbase-net-client/blob/6e97fb87007f12bbd38ab1159e590bcf62f2046e/Src/Couchbase/Core/Server.cs#L328
But for that, it will use the broken authentication
And it will throw internal exceptions, which do not seem to be properly handled because after that, it starts opening connections at a rate of 4 new per seconds, without EVER closing them.
And we end up with 30K connections open to a couchbase server where we should only have < 100
System.Security.Authentication.AuthenticationException HResult=0x80131501 Message=Authentication failed for bucket 'papi' Source=Couchbase.NetClient StackTrace: at Couchbase.IO.ConnectionPoolBase`1.Authenticate(IConnection connection) > Couchbase.NetClient.dll!Couchbase.IO.ConnectionPoolBase<Couchbase.IO.MultiplexingConnection>.Authenticate(Couchbase.IO.IConnection connection) Unknown Couchbase.NetClient.dll!Couchbase.IO.SharedConnectionPool<Couchbase.IO.MultiplexingConnection>.CreateAndAuthConnection() Unknown Couchbase.NetClient.dll!Couchbase.IO.SharedConnectionPool<Couchbase.IO.MultiplexingConnection>.Acquire() Unknown Couchbase.NetClient.dll!Couchbase.Core.Server.CheckDataNode() Unknown System.Private.CoreLib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 145 C#
|
Attachments
For Gerrit Dashboard: NCBC-1666 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
92948,3 | NCBC-1666: Bad Authentication Causes Connection Leak | master | couchbase-net-client | Status: MERGED | +2 | +1 |
93225,2 | NCBC-1666: Bad Authentication Causes Connection Leak | release25 | couchbase-net-client | Status: MERGED | +2 | +1 |