views:

72

answers:

4

Hi there,

Got a slightly odd one here.

We have an MVC site that is experiencing some instability. Once a week for the last couple of weeks the site has gone down. We have found that all we need to do to bring the site back up again is 'touch' the web config file (i.e. open it and save it, with no changes). This brings the site back to life immediately and keeps it alive for another week or so.

The site has custom error pages set up so we can't actually see the error that is being thrown, and there is nothing appearing in the IIS logs.

It looks like some kind of memory leak problem, however .NET garbage collector should manage this, right?

Any ideas?

Thanks,

Pat

+1  A: 

You should have some kind of logging so that you can see what error you get. I usually use elmah. That will give you the full error message and stack trace. It's pretty hard to say what the problem is without knowing the error. But it can be a memory leak of some kind. Do you use a lot of unmanaged code? The garbage collector can't handle everything.

Mattias Jakobsson
A: 

It looks there is a problem with your application pool or the whole IIS , since it's fixed with touching web.config. Can you provide more details ?

anthares
A: 

Thanks for the feedback. I'll try to gather together a bit more info about the error that is being thrown and post it here. Could be a few days though as we will need to wait for the site to crash again! Pat

Pat C
+1  A: 

Touching the web.config forces recompilation and refreshes the app pool. My guess is something is knocking out your app pool, whatever it is will be in the event logs, i suggest you check there.

Al Katawazi