-->
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.  [ 5 posts ] 
Author Message
 Post subject: profiler: "Audit LogOut" needs so much time??
PostPosted: Fri Oct 03, 2008 11:37 am 
Newbie

Joined: Sun Jan 13, 2008 6:48 am
Posts: 16
NHibernate version:
1.2 (on MSSQL2005 w/ ASP.NET 2.0)

Hi,

i'm using NHibernate within an ASP.NET application. Now, after a few weeks of my thread about how to implement the session handling correct (i implemented it as described in http://www.beansoftware.com/asp.net-tut ... g4net.aspx), i have a new problem:

When i'm taking a look in the provider, i see an "Audit Logout" after each query, with a duration of around 300 - 500, but sometimes up to 200k.
The value of 200k is an exception, usually its around 300 - 500.

(Another issue, what i don't understand fully, is, why are these events happening before each query, but that's not the topic of this thread...)

At first, i thought it has something to do with my old-session-handling implementation, but since i have rewritten the session-handling to the correct-way-of-doing-it-with-ASP, this can't be the problem anymore.

Any suggestions?


Regards,

John

P.S.: My developmentmachine is fast enough, i think: P4/3Ghz, 2GB RAM, XPSP2


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 08, 2008 3:41 pm 
Newbie

Joined: Wed Oct 08, 2008 3:28 pm
Posts: 1
It's difficult to make out from your post but if you are seeing :

Audit login
some query
Audit logout

Audit login
some other query
Audit logout

I suspect your app is not using connection pooling.

If you are using SQL 2005 SP2:
Restart your profiler trace with the additional event subclass event column. This will report 'Pooled' or 'Non pooled'. If you get non-pooled, your problem is connection pooling.

If you are using SQL 2005 SP1 or before and you see the above trace for sure your application isn't using connection pooling.


If you confirm your app is not using connection pooling add this to your connection string:

Min Pool Size=1


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 10, 2008 12:35 pm 
Newbie

Joined: Sun Jan 13, 2008 6:48 am
Posts: 16
Hi Noel,

at first, thank you for your input.

On the question what i see: its what you described, i see:
Code:
Audit login
(query)
Audit logout


Regarding your hint:
to be honest, i dont know if my application uses connection pooling - i will check this! (i thought NHibernate will do this automatically?)


Regards


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 17, 2008 4:13 am 
Newbie

Joined: Sun Jan 13, 2008 6:48 am
Posts: 16
Hi,

to keep you updated:

SQL-Profiler shows me "pooled" in the add. EventSubClass. (Unfortunately, i can't attach a screenshot, here?)

I've checked SQL-Profiler output now for a few hours:
when the application is "running for some time" (10 minutes, or so), the Audit LogOut after each query takes nearly constantly around 16ms in den "Duration"-column.

Any other ideas or suggestions?


Top
 Profile  
 
 Post subject: Re: profiler: "Audit LogOut" needs so much time??
PostPosted: Tue Jan 05, 2010 7:54 pm 
Newbie

Joined: Tue Jan 05, 2010 12:30 pm
Posts: 1
I encountered the same problem, which seems caused by the transaction, and how to resolve it?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.