AppDomain randomly reloads

  • Thread starter Thread starter SevDer
  • Start date Start date
S

SevDer

Hi
We have a case that our AppDomain (workerprocess) reloads randomly.
We simply have a public static hashtable that keeps an object inside which
is determined by the key sessionID, and although we have the same SessionID,
all of a sudden, static hashtable looses its values. This happens both on
production and development enviorment.

Do you know why this might happen?
This is a follow up for the following thread from C# group.
http://groups.google.com/group/micr...&q=static+hashtable+looses+its+contents&hl=en

Note: I've read that, if we have dynamic files in the web application
folder, ASP.NET reloads the worker process. The following article says that,
even the log files we put can cause this problem. Is that true?
(Our log files are not exactly under the main web folder it is located some
where like "webappfolder\sub1\sub2\logs\app\*.txt")
The article: http://objectsharp.com/blogs/bruce/archive/2004/11/01/992.aspx


Thanks in advance,
SevDer
http://www.sevder.com
 
Where do you keep your hashtable? Why don't you use a Cache or Session? If
you keep it
in a hash table you got many chances that when the memory pool resets or a
new binary is
installed the process will restart, if you keep it into a cache table in SQL
or a Session in SQL
you'll be ok for the duration of the Cache or Session.

Please give me more details of what are you trying to accoplish and I'll
help you to design it.

Cheers
Al
 
It is static hash table because, there are many threads that updates the
object data, and it will perform, best when the updated object is in phsical
memory. However if you put in cache, you cannot guarantee that the data will
be always in memory but not in disk.
As for session, for multiple threads are not supported and SQL will be
expensive. Please see the old thread for this for more details.

Anyway, we do not change binaries etc. It just recycles after some time.
 
Back
Top