We’ve been having issues for quite awhile with the .NET Membase Client we use in our web service often timing out when storing some login details in Couchbase. The timeout is set to 10 seconds, which seems fairly high given it’s only 8KB or so of data being sent. Originally I thought the issue may have been with the Couchbase server, but it’s very under-utilised, and updating it to the latest version didn’t help anything. I also tried using the CouchbaseClient instead of the MembaseClient, but this didn’t help either. After trying quite a few things and going a little crazy I managed to track the issue down to the client instance being a static variable that only gets initialised when it’s first accessed. I tried creating a new instance every time it gets used, and haven’t had any timeout issues since. But, I know that creating a new instance for each request is very inefficient because we’re not taking advantage of connection pooling. I’ve looked through some tutorials and in those they use a static couchbase client… so I’m not really sure what the issue could be. Note that when we do use a static client a good number of the communications don’t time out, but then it will all of a sudden timeout about three times in a row, then the next attempt will be fine.