Some recently fixed threading problems:
https://nhibernate.jira.com/browse/NH-3039
https://nhibernate.jira.com/browse/NH-3271

But since you have different processes I don't see of these could
interfere with each other in that way. The serialized configuration is
one thing of course... file locking?

But I think you should try to find more data on the crashes. Are these
unhandled .Net exceptions, or crashes in native code, and if so where?

/Oskar


2013/2/19 Rippo <[email protected]>:
> In IIS7.5 the "Disable Overlapped Recycle" setting is false by default. This
> allows requests to finish processing on the old process whilst the new w3p
> process is firing up.
>
> I have quite a large .net4 NHibernate asp.net mvc project that I serialise
> the configuration for quicker start up.
>
> Has anyone had issues in this scenario when the the app pool is recycled? Is
> it possible for the SessionFactory to be shared somehow across the two
> processes and cause problems. The reason I ask is that I have set up a crash
> rule for IIS using the Debug Diagnostic tool and can see occasion crashes.
> Sometimes I can witness the old w3p process does not shutdown properly and
> the new overlapped w3p process doesn't load properly which then crashes my
> app completely.
>
> I am not sure whether I can lay the blame on Nhibernate OR if it is
> something else, hence my question about anyone having issues with this
> overlapping processes and NHibernate.
>
> Thoughts?
>
>       private static ISessionFactory SetUpNhibernate()
>       {
>
>          var file =
> HttpContext.Current.Server.MapPath("~/App_Data/cfg-serialised.xml");
>          IFormatter serializer = new BinaryFormatter();
>          var cfg = new Configuration();
>
>          if (File.Exists(file))
>          {
>             using (var stream = File.OpenRead(file))
>             {
>                cfg = serializer.Deserialize(stream) as Configuration;
>             }
>          }
>          else
>          {
>             var mapper = new ModelMapper();
>             mapper.AddMappings(typeof(CmsMeta).Assembly.GetTypes());
>             var mapping =
> mapper.CompileMappingForAllExplicitlyAddedEntities();
>             cfg.Configure();
>             cfg.AddDeserializedMapping(mapping, "Domain");
>             using (var stream = File.OpenWrite(file))
>             {
>                serializer.Serialize(stream, cfg);
>             }
>          }
>
>          return cfg.BuildSessionFactory();
>       }
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/nhusers?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to