Hi, I have a lot of repeating errors in the Event log viewer (windows) but 
can't find anything on google about it.

After a while, the application pool stops because of too many errors.

This is the error :

Exception: System.TypeInitializationException Message: The type initializer 
for 'Enyim.Caching.MemcachedClient' threw an exception. StackTrace: at 
Enyim.Caching.MemcachedClient.Finalize() InnerException: 
System.Web.HttpException Message: An error occurred while attempting to 
impersonate. Execution of this request cannot continue.

I'm using a memcached bucket on a web farm (3 servers). I have to say that 
the site works and couchbase too. Wehn I go to the console, I can see all 
the requests users are making and it seems to work well. It's just that the 
even viewer is full of errors and the application pool stops once in a 
while and this is the only reason I can find. If I can fix this memcached 
error I'm pretty sure it will fix everything.

The app is runned by IIS ApplicationPoolIdentity so it's run by the 
application pool itself (IIS7).

This is what I use in my web.config.

<couchbase>
<servers bucket="default" bucketPassword="">
<add uri="http://172.16.X.Y1:8091/pools <http://172.16.x.y1:8091/pools>"/>
<add uri="http://172.16.X.Y2:8091/pools <http://172.16.x.y2:8091/pools>"/>
<add uri="http://172.16.X.Y3:8091/pools <http://172.16.x.y3:8091/pools>"/>
</servers>
</couchbase>

I intentionaly removed the end of my ip adress.

What are the correct permissions I have to give to the impersonated 
security context. And to which user ? the application pool of my web app ?

I'm not calling client.Dispose(); anywhere. Where should it be called ? I 
use a static instance of the client as a singleton like this.

private static readonly CouchbaseClient _cacheInstance = new 
CouchbaseClient("couchbase");

internal static CouchbaseClient CacheInstance
{
get { return _cacheInstance; }
}

And when I need it I only call

MyClass.CacheInstance.Store(StoreMode.Set, storeID, objToStore);

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to