-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Unusual performance problem with Nhibernate and asp.net
PostPosted: Thu Feb 22, 2007 2:23 pm 
Beginner
Beginner

Joined: Mon Sep 26, 2005 5:57 pm
Posts: 39
I have run into an unusual problem when running our ASP.Net application with Nhibernate. This problem seems to have cropped up only in .Net 2.0, because the application worked fine in .Net 1.1.

The symptoms of the problem are: suddenly, the CPU reaches a 100% utilization on the server and when I look in the Processes, there are many (a lot) of instances of csc.exe. Which surprised me at first, because the web site is written in vb.net (and is fully pre-compiled) and so is the Nhibernate data layer. Even Microsoft cannot figure out why these csc.exes are being spawned, and that too, at an unpredictable time.

After doing a lot of research on this issue, (and I am not at all sure about this), I suspect the issue may have something to do with generation of serialization assemblies. Most probably the serialization assemblies that are being dynamically generated by Nhibernate (or the DynamicProxy) are not being cached.

Have you guys seen anything like this before? Can you give me a pointer as to what might be causing this error or where should I look?

Thanks

arvinder chopra


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 22, 2007 3:22 pm 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
About the only thing that I can think of that can cause this issue is the code dom optimizer, but that should run ONCE, not multiply times.
Put a breakpoint on Process.Start() and take a look at what is causing it.
Dynamic Proxy isn't using CSC and neither does any other part of NH except the code dom optimizer.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 22, 2007 7:55 pm 
Beginner
Beginner

Joined: Mon Sep 26, 2005 5:57 pm
Posts: 39
Do you think that a worker process recycle may cause the code dom optimizer to run again.

The project has a lot of Nhibernate classes, and when this problem occurs, I see a lot of csc.exes and CPU at 100%, and after about 20 minutes, it comes back down to normal levels.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 23, 2007 3:48 am 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
HIGHLY unlikely. 20 Minutes is a huge amount of time.
As always, profile the system to see what is causing this.


Top
 Profile  
 
 Post subject: Re: Unusual performance problem with Nhibernate and asp.net
PostPosted: Thu Jul 31, 2008 3:21 am 
Newbie

Joined: Thu Jul 31, 2008 2:32 am
Posts: 1
Location: Istanbul
jbliss1234 wrote:
I have run into an unusual problem when running our ASP.Net application with Nhibernate. This problem seems to have cropped up only in .Net 2.0, because the application worked fine in .Net 1.1.

The symptoms of the problem are: suddenly, the CPU reaches a 100% utilization on the server and when I look in the Processes, there are many (a lot) of instances of csc.exe. Which surprised me at first, because the web site is written in vb.net (and is fully pre-compiled) and so is the Nhibernate data layer. Even Microsoft cannot figure out why these csc.exes are being spawned, and that too, at an unpredictable time.

After doing a lot of research on this issue, (and I am not at all sure about this), I suspect the issue may have something to do with generation of serialization assemblies. Most probably the serialization assemblies that are being dynamically generated by Nhibernate (or the DynamicProxy) are not being cached.

Have you guys seen anything like this before? Can you give me a pointer as to what might be causing this error or where should I look?

Thanks

arvinder chopra


Hi could you find a solution to your problem,

i think my problem same as yours and may provide me a way to solve mine.
My asp.net 2.0 application also uses NHibernate but when the app reache nhibernate classes cpu usage is high so this causes running application slow, wait and hang the system for a few minutes..

I did lots of searching in the nHibernate forum could not found any solution related that problem.

By the way in my app when the app started it's hanging at the NHibernate create Active session as seen below.

Image
Image
Image

What is the problem and how i can slove it please help me i can also provide additional information on the application configuration if needed.

Web Site and Application Configuration:
ASP.NET Framework 2.0
IIS 5.1
NHiberNate Library Version 1.0.1.0
log4net 1.2.9.0
Castle.DynamicProxy 1.1.5.0
Iesi.Collections 1.0.0.1

Thanks

Erhan AKOZ[/img]


Top
 Profile  
 
 Post subject: Re: Unusual performance problem with Nhibernate and asp.net
PostPosted: Thu Aug 21, 2008 8:51 am 
Newbie

Joined: Thu Aug 21, 2008 8:22 am
Posts: 5
you are using NHiberNate Library Version 1.0.1.0
There is a new version (1.2.1 and 2.0 as beta) you can use it.
And you can follow this article for using session in view pattern
http://www.codeproject.com/aspnet/NHibe ... ctices.asp


whitecore wrote:
jbliss1234 wrote:
I have run into an unusual problem when running our ASP.Net application with Nhibernate. This problem seems to have cropped up only in .Net 2.0, because the application worked fine in .Net 1.1.

The symptoms of the problem are: suddenly, the CPU reaches a 100% utilization on the server and when I look in the Processes, there are many (a lot) of instances of csc.exe. Which surprised me at first, because the web site is written in vb.net (and is fully pre-compiled) and so is the Nhibernate data layer. Even Microsoft cannot figure out why these csc.exes are being spawned, and that too, at an unpredictable time.

After doing a lot of research on this issue, (and I am not at all sure about this), I suspect the issue may have something to do with generation of serialization assemblies. Most probably the serialization assemblies that are being dynamically generated by Nhibernate (or the DynamicProxy) are not being cached.

Have you guys seen anything like this before? Can you give me a pointer as to what might be causing this error or where should I look?

Thanks

arvinder chopra


Hi could you find a solution to your problem,

i think my problem same as yours and may provide me a way to solve mine.
My asp.net 2.0 application also uses NHibernate but when the app reache nhibernate classes cpu usage is high so this causes running application slow, wait and hang the system for a few minutes..

I did lots of searching in the nHibernate forum could not found any solution related that problem.

By the way in my app when the app started it's hanging at the NHibernate create Active session as seen below.

Image
Image
Image

What is the problem and how i can slove it please help me i can also provide additional information on the application configuration if needed.

Web Site and Application Configuration:
ASP.NET Framework 2.0
IIS 5.1
NHiberNate Library Version 1.0.1.0
log4net 1.2.9.0
Castle.DynamicProxy 1.1.5.0
Iesi.Collections 1.0.0.1

Thanks

Erhan AKOZ[/img]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.