Hi James,

They told me to study, and was what I did. :)
But the simple Hello World of the "NHibernate in Action" has the same 
problem, just insert 100,000 rows in the Employee table and the programs 
consumes 60MB, that never releases, even with the forced GC.

Thank you,
Bruno

James Kovacs wrote:
> Hi, Bruno,
>
> The information that you provide is insufficient to assist you. I (and 
> many others here) have used NHibernate in a variety of production 
> applications - web, windows, and web services - without experiencing 
> the problem that you're describing. I'm not saying that your problem 
> doesn't exist. Just that we have insufficient information to help you 
> resolve it.
>
> You are correct that the standard pattern is to acquire an ISession 
> from a static ISessionFactory and dispose of the ISession once you're 
> done using it. In a web application using session-per-request, you 
> acquire a new session at the beginning of a HTTP request and dispose 
> of it at the end.
>
> I would recommend reproducing the error in a small example project 
> that we can reasonably take a look at. I would also recommend looking 
> at some of the sample applications available to see what they are 
> doing differently with regard to session management than you are.
>
> James
> --
> James Kovacs, B.Sc., M.Sc., MCSD, MCT
> Microsoft MVP - C# Architecture
> http://www.jameskovacs.com
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> 403-397-3177 (mobile)
>
>
> On Fri, Sep 12, 2008 at 7:08 AM, Bruno Matos <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi Ken,
>
>     Tkans for the replay. It's what I'm trying to do, but the
>     session.Close don't release the memory...
>
>     --
>     Bruno
>
>
>     Ken Egozi wrote:
>>     you need to get rid of the session at the end of every UoW.
>>
>>     so - a single SessionFactory for the app's life, but a session
>>     per conversation.
>>
>>
>>     On Fri, Sep 12, 2008 at 3:58 PM, Nelo Pauselli
>>     <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>>
>>
>>         Hi Bruno, is your applicacion a web site?. I had this problem
>>         but I
>>         don't remember the solution. I am searching it!
>>
>>         When do you make Configuration.BuildSessionFactory() ?
>>
>>         Nelo.
>>
>>         On Fri, Sep 12, 2008 at 8:37 AM, bmm <[EMAIL PROTECTED]
>>         <mailto:[EMAIL PROTECTED]>> wrote:
>>         >
>>         > Hello,
>>         >
>>         > I'm using a Utils.cs file with a static SessionFactory
>>         object, every
>>         > time I use a session from this factory I close the session.
>>         I thought
>>         > that this would release all the memory affected to that
>>         session, but
>>         > in final my memory grows until a
>>         System.InsufficientMemoryException
>>         > rise.
>>         >
>>         > I have tried the most simple tricks, like make a
>>         session.Clean(),
>>         > Evict of all objects, etc. But the only think that seems to
>>         work is to
>>         > put the SessionFactory as a instance variable and make a
>>         > SessionFactory.close() after every sessio.close(). Although
>>         this is
>>         > not a definitive solution because it takes 5 sec to open a
>>         > Sessionfactory.
>>         >
>>         > If someone could help I would appreciate!
>>         >
>>         > Thank you,
>>         > Bruno
>>         >
>>         > >
>>         >
>>
>>
>>
>>
>>
>>     -- 
>>     Ken Egozi.
>>     http://www.kenegozi.com/blog
>>     http://www.musicglue.com
>>     http://www.castleproject.org
>>     http://www.gotfriends.co.il
>>
>>
>
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to