Jul 26 2007

Debugging a Web Garden

Category: Rabbit TrailsJoeGeeky @ 13:24

Today I experienced one of those errors that can just drive you crazy. Ostensibly, the error was something that you would normally expect to see in code behind or at least represented in the classic white and yellow ASP.NET error page. In this case, our testers reported they were receiving fully-fledged “Windows Internet Explorer” dialog messages with every .NET developer’s favorite message “Object reference not set to an instance of an object.”. This was happening everywhere, and appeared to increase as the system load increased.

No matter how hard I tried, I could not recreate the problem on the development systems nor was I able to catch it with any debugger…  After some head-scratching I noticed the only difference between the two environments (e.g. Development and Testing) was the number processors and that reminded me I that Web Gardening had recently been enabled. While this is a great way to enhance performance, memory management, and scalability for your web applications it requires an out-of-process state manager to ensure session state is not lost between the different processor instances in the web garden. In this case, there was no state manager and once one was added all the problems went away.

<?xml version="1.0"?>
<configuration>
    <system.web>
        <!--This added to support web gardening and 
        out-of-process session management-->
        <sessionState mode="StateServer"
            stateConnectionString="tcpip=localhost:42424"
            cookieless="false"
            timeout="20"/>
 </system.web></configuration>

Conceptually, one instance started handling a given set of user requests and as the load increased, some of them started being handled by a new instance which did not have any of the state information that was being requested. With that solved, I was left with one lingering questions…  Why did they get a dialog box?  In every case, the error messages were thrown from within AJAX Async processes. I am just glad it’s over…

Tags:

Comments

1.
Ed Berry Ed Berry United States says:

Unbelievable! Is this really the way things work? If it is, I can see why people like it.

2.
Bryant Bryant United Kingdom says:

what a great site and informative posts, I will add backlink - bookmarked this site? Regards,

3.
cool amber cool amber People's Republic of China says:

<P>this truly aids, now i happen the problems and i donot know how to solve,
i search bing and found your blog,
thanks once again</P><P>one thing, may i post this entry on my blog? i will add the source.</P><P>regards!</P>

4.
Dario Wischman Dario Wischman United Kingdom says:

A thoughtful insight and ideas I will use on my blog. You've obviously spent some time on this. Well done!

5.
Thad Wamsley Thad Wamsley United Kingdom says:

This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work.

6.
Caleb Caleb United States says:

You gave nice ideas here. I done a research on the issue and learnt most peoples will agree with your blog.

7.
Emil Senner Emil Senner United Kingdom says:

Aw, this was a really quality post. In theory I'd like to write like this too - taking time and real effort to make a good article... but what can I say... I procrastinate alot and never seem to get something done.

8.
Rosann Leray Rosann Leray United Kingdom says:

I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.

9.
Shan Codding Shan Codding United Kingdom says:

I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the latest stuff you post.

10.
Jeanna Roedel Jeanna Roedel United Kingdom says:

This is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. I truly loved reading your post. Thanks!

11.
Lauren Lauren United States says:

I was looking for crucial information on this subject. The information was important as I am about to launch my own portal. Thanks for providing a missing link in my business.

Comments are closed