ASP.NET Couchbase SessionState loop forever when Couchbase Server died

aspnet
sessionstate
#1

Hi all,

I have a problem with ASP.NET Couchbase SessionState: https://github.com/couchbaselabs/couchbase-aspnet

In the normal case everything is OK but when we enter wrong Couchbase URL in web.config or Couchbase Server died the web server w3wp is still take resource and web server CPU jump to 100% very fast,

Couchbase client have an infinite loop here and we don’t know how to fix this.

Worker --> ProcessPool --> MessageStreamListener.
private void ReadMessages(Uri heartBeatUrl, Uri configUrl)

while ((line = reader.ReadLine()) != null)
{

}

My problem seem same as topic: Runaway worker process when cluster node shutdown - SessionState provider

Please help me.

Thanks
Nguyen Tung

#2

@tungnt185

What versions of the SDK and the SessionState provider are you using?

1 Like
#3

@tungnt185 -

It sounds like a bug so I created a Jira ticket: https://issues.couchbase.com/browse/CBASP-20

We are expecting to do a release in the near future, so this will be addressed in that release.

The infinite loop isn’t expected, but anytime you bring the cluster down or provide an invalid configuration, your going to run into issues.

-Jeff

1 Like
#4

Hi Jeff,

Are there any timeline to fix this bug or any workaround at the moment?
I have to fix it now for stable deployment.

Thanks
Tung

#5

@tungnt185

How integrating is session state into your project? We’ve had a couple of different projects where we’ve approached this in a couple of different ways.

  1. We had a legacy app we were porting to Couchbase that used a lot of session state. So we used the ASP.Net Couchbase SessionState provider. Fortunately, our cluster has been very stable, so it hasn’t been a problem.

  2. For another project, we just made the decision not to use session state (or TempData) from the beginning. We found we could do it more efficiently ourselves. When we need to store something, we just store a unique cookie ourselves and then store the data in Couchbase using the cookie’s value as the key, with an expiration. This actually helped us avoid some of the overhead of the ASP.Net session state system.

However, clearly this solution would be hard to implement in an existing project with lots of work tied into SessionState already.

Brant

#6

Hi brburnett3,

Thanks for your concern, we use session state as mode custom of asp.net membership provider.
It’s all new app build from scratch, if couchbase server not down so there are no problem but whenever one down all w3wp process take 100% CPU resource take my web server down too.

It’s a critical problem because on the web server we’ve host many web app.
I want to find a solution to prevent couchbase server down affect my web server but can’t find one.

Regards.
Tung