OutOfMemoryException...Unable to serialize the session..?

G

Guest

We just started getting this error message in our application today (stack
trace below). From the OutOfMemoryException, I'm guessing it could be a
memory leak. I'm making sure I'm closing all my connections in the finally
block but I'm not sure what I should be doing.

As far as the "Unable to serialize the session state" error, this app has
been running for days and this is the first I've seen this one as well.

Any thoughts would be greatly appreciated...

[OutOfMemoryException: Exception of type System.OutOfMemoryException was
thrown.]

[HttpException (0x80004005): Unable to serialize the session state. Please
note that non-serializable objects or MarshalByRef objects are not permitted
when session state mode is 'StateServer' or 'SQLServer'.]
System.Web.Util.AltSerialization.WriteValueToStream(Object value,
BinaryWriter writer) +1710
System.Web.SessionState.SessionDictionary.Serialize(BinaryWriter writer)
+148
System.Web.SessionState.StateClientManager.Serialize(SessionStateItem
item, Stream stream) +146

System.Web.SessionState.SqlStateClientManager.System.Web.SessionState.IStateClientManager.Set(String id, SessionStateItem item, Boolean inStorage) +126
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source,
EventArgs eventArgs) +465

System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +87
 
B

Bruce Barker

the outofmemory error is misleading. the real problem is trying to store an
object in a sqlserver session manager that cannot be serialized. not all
..net object can be serialized, check that what you store in session can.

-- bruce (sqlwork.com)
 
R

rich leung

Hello,
I use an ASP.Net app on WIndows 2000 with SQL Server 2000 to store
persistant sessions.
I have the same problem but it does not always happen. I can be doing a
particular task one day without errors but on another day I will get the
error (Doing the exact same thing).
The only thing I've noticed is the Total Server Memory under Performance
Monitor rises and rises over a span of a couple of days. Once it exceeds 40
out of 100 it is likely I will come across this problem.

Please can anyone help?
Rich.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top