.NET client - Failed to obtain socket from pool
hi,
i have a .NET client 1.1.6 running against couchbase server 1.8.1.
It sometimes happens that when i try to remove item from server like
var result = Client.ExecuteRemove(lockName);
while(!result.Success)
{
// log error
_logger.Error(string.Format("Attempt {0} to remove {1} failed. Message = {2}. Exception = {3}. InnerResult.Message = {4}. StatusCode = {5}.",
attemptCount,
lockName,
result.Message,
result.Exception,
result.InnerResult.Message,
result.StatusCode));
}
i see following message to be logged " Message = Failed to remove item, see InnerResult or StatusCode for details. Exception = . InnerResult.Message = Failed to obtain socket from pool. StatusCode = . "
when i check the time then i see it happens just during certain period lasting exactly 10 seconds. so this call will be in the while loop for 10 secs.
what is the reason for this behavior? is there a way to tune it somehow? where does it come from - client or server ?
thanks
Lubos
hi,
thanks for answer. if i understand that correctly then we should increase SocketPool.MaxPoolSize to a higher number.
Is there any guideline how to set it? i found in documentation for enymcaching that it shall be 0.75*count of threads, but this doesn't help us... what is safe number (app runs on win 2008 r2 64b servers).
In general, in our application we have two clients (one is for caching and one is for locking). Each is shared by certain amount of threads - locking one by many more currently - is that correct design anyway ?
regards
Lubos
Hi Lubos,
10 seconds is the default timeout for a couple of different connection timeouts - http://www.couchbase.com/docs/couchbase-sdk-net-1.2/couchbase-sdk-net-co.... It seems like that would be the likely cause. There are some fixes to error message handling in the 1.2 client. If you give that a try, even with 1.8.1, you should see more details in the errors.
-- John