tags:

views:

16

answers:

0

Hi

Recently we did some load testing on one of our MVC2 app, and we found out that every time when we hit 20 users web server CPU get maxed out. We spent so much and finally narrowed it down to Unity Interception. Our App uses Unity 1.2.

The problem is in the below code

          Line 1 - unityContainer.Parent.AddNewExtension<Interception>();
          Line 2 - unityContainer.Parent.Configure<Interception> ().SetDefaultInterceptorFor<ICustomerServiceProxy>(new InterfaceInterceptor ());
          Line 3 - unityContainer.Parent.RegisterType<ICustomerServiceProxy, CustomerServiceProxy>();

Once I remove Line 1 and Line 2 our app performs well under load testing but our Caching (which build on top of Unity Caching Application block) doesn’t work. We tried

a. Changing the order of Line 1 and Line 2

b. Virtual Method Interceptor

    unityContainer.RegisterType<Logger>();
       unityContainer.Configure< ICustomerServiceProxy >().
           unityContainer < ICustomerServiceProxy >(new VirtualMethodInterceptor());

We are run out of options. Any ideas greatly appreciated.

Cheers,

Raj