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.  [ 2 posts ] 
Author Message
 Post subject: NHibernate 2.0 + IIS 5.0 OutOfMemoryException
PostPosted: Thu Jan 29, 2009 6:22 pm 
Newbie

Joined: Thu Jan 29, 2009 5:40 pm
Posts: 2
Hi all!

We're getting an OutOfMemory exception in our NHibernate asp.net application after a period of time. We're using the session-per-request-pattern (drawing from McCafferty's examples), but logging shows us that each session gets closed after use.

We're running:
NHibernate 2.0.0.4000, with hbm-file-mapping
Windows Server 2000
SQL Server 2000

This happens even on a test server, that's hit only by a bot doing automated requests every 10 minutes (logging in, and accessing main page). Enough to initiate an NHibernate session, but only doing one simple query validating the user credentials.

Memory debugging apparently shows that there still are some kind of NHibernate objects in memory.

The problem doesn't appear on dev machines (using XP Pro).

Any ideas what it could be? Could it even be anything else than that sessions don't close even though we believe they do? Some strange bi-directional mapping thing?

Thanks in advance!

/Magnus


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 7:35 am 
Newbie

Joined: Thu Jan 29, 2009 5:40 pm
Posts: 2
Here's an example of an event log warning:

Exception information:
Exception type: OutOfMemoryException
Exception message: Exception of type 'System.OutOfMemoryException' was thrown.

Stack trace: at System.Xml.Schema.Compiler.CompileComplexType(XmlSchemaComplexType complexType)
at System.Xml.Schema.Compiler.CompileElement(XmlSchemaElement xe)

<snip several lines>

at System.Xml.XmlReader.Create(XmlReader reader, XmlReaderSettings settings)
at NHibernate.Cfg.Configuration.LoadMappingDocument(XmlReader hbmReader, String name)
at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name)


We're getting several of these warnings before aspnet_wp.exe crashes and recycles, which hints towards there being something fishy in the mapping files. Right?

I run sql server 2008 with MsSql2005Dialect on my dev-machine, but we run MsSql2000Dialect against sql server 2000 on production.

Does anyone know if MsSql2005Dialect is more forgiving of bad mapping files? Would the dialect even affect the mapping configuration?


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