[Mono-aspnet-list] issues with intermittent apache hangups

Dan parnham at gmail.com
Mon Oct 8 09:12:14 UTC 2012


Since it did not look like the problems with the mono asp.net stack
were going to be fixed, we looked for an alternative way of doing
things and came across ServiceStack.

I wrote a blog post about it at
http://blog.teadriven.me.uk/2012/03/time-for-rest.html and we're still
happily using it.

Our application is now a simple ServiceStack console application
and we swapped nHibernate for ServiceStack.OrmLite. It is all running
on mono 2.10.8 and seems perfectly stable, plus it means we avoided
having to switch to the MS stack which was a critical point for us.


On 8 October 2012 08:16, Sergey Lobko-Lobanovsky [via Mono]
<ml-node+s1490590n4656872h12 at n4.nabble.com> wrote:
> Hello Dan,
> Did you finally revert to using the MS stack?
> I wonder if the issues described in this thread are still happening to
> others :)
> By the way, my setup back then also used fluent nhibernate, but I don't
> remember the exact version, as it was a year ago.
> Sergey.
> On Fri, Jul 22, 2011 at 12:32 PM, Dan <[hidden email]> wrote:
>> An update on where we are with this issue!
>> The libraries that we are now using are as follows:
>> mono 2.10.2
>> fluent nhibernate 1.2 (nhibernate 3.1)
>> MVC3
>> We've spent the past couple of months trying to figure out why our
>> applications are leaking memory and have found a few worrying issues. I
>> won't go into details about some of the problems we've seen but will
>> concentrate on the leaks since they cause the web applications to
>> gradually
>> grind to a halt.
>> I developed a test application (MVC 2 & 3) which contained some simple
>> javascript to poll the server very quickly. Monitoring this with the mono
>> profiler we found that it never seemed to be garbage collecting the
>> CacheItems. However it didn't leak at the same rate as our full web
>> applications so something else was going on too.
>> Finally with a lot of experimentation we have found that if we switch our
>> web applications to sessionless (sessionState mode="Off" in Web.config)
>> they
>> no longer seemed to leak CacheItems and we found that running nhibernate
>> in
>> "thread_static" mode did not seem to leak but "web" did. Since we couldn't
>> leave it as thread_static for the web applications we switched to our own
>> simplified CurrentSessionContext implementation.
>> With those changes our web applications appeared to no longer leak, but in
>> fact the applications stopped leaking when running in XSP and as soon as
>> we
>> deploy to mod_mono they happily start chewing up memory again.
>> We are also developing a daemon to run alongside the web applications that
>> uses the same fluent based data provider as the web application (although
>> running in thread_static mode) and the memory usage for that appears to be
>> solid, so we know it is not a problem with our data provider
>> implementation.
>> All the evidence seems to point towards the System.Web related libraries
>> (with hints of CacheItem and HashMap thrown in), but we are not familiar
>> enough with how it all works to even know where to begin looking, and
>> frankly we've wasted too much time on this already.
>> We have been trying to solve these issues for so long now that we're
>> having
>> to seriously consider deploying to .NET, despite the fact that we've
>> invested a lot of time in building a linux-based server module for the
>> daemon and web applications.
>> If we are no longer seeing leaks using XSP, is there a possibility that we
>> could deploy our web application using that instead of mod_mono (by
>> setting
>> up apache with mod_proxy)?
>> Regards,
>> Dan
>> --
>> View this message in context:
>> http://mono.1490590.n4.nabble.com/issues-with-intermittent-apache-hangups-tp3264509p3686332.html
>> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
>> _______________________________________________
>> Mono-aspnet-list mailing list
>> [hidden email]
>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
> _______________________________________________
> Mono-aspnet-list mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://mono.1490590.n4.nabble.com/issues-with-intermittent-apache-hangups-tp3264509p4656872.html
> To unsubscribe from issues with intermittent apache hangups, click here.

View this message in context: http://mono.1490590.n4.nabble.com/issues-with-intermittent-apache-hangups-tp3264509p4656873.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20121008/c977efe6/attachment.html>

More information about the Mono-aspnet-list mailing list