Re: force reload of application from asp.net
From: Steve Drake (Steve_at_NOSPAMDrakey.co.uk)
Date: 03/03/04
- Next message: Martin Dechev: "Re: missing text in a label"
- Previous message: Joy: "Script in body"
- In reply to: matt: "force reload of application from asp.net"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 3 Mar 2004 08:59:38 -0000
I think doing the touche is a work around until you track down your
connection code that is keeping the connection open.
Are you using using? eg
using (SqlConnection connection = new SqlConnection())
{
// DO STUFF
}
I adopted some code that had this problem, I just did a search for all new
SqlConnection() and wrapped them with a using.
"matt" <groups_NOSPAM_@hitscricket.com> wrote in message
news:_i11c.14410$h44.1528629@stones.force9.net...
> Hi,
>
> We have an ASP.net application that sporadically fails with a strange
> problem regarding the Max number of pooled connections being reached for
the
> database. I am currently in the process of tracking down the root cause
of
> this problem, although this is proving very difficult, I am as sure as I
can
> be (99.99%) that all my connections are closed as I have extensively
> debugged this and now have all db connections managed internally to ensure
> there are no connections which are not closed and thus cause this problem.
> This problem has only occurred since we moved to a new dedicated server
for
> this application, although maybe it has only been highlighted now. Also
> strange is that the requests that seem to occur at the same time as this
> error are generally using the IP address of our site (which is not setup
to
> serve pages in our system, although will produce an asp.net generated
> message), not for the domain name which we would expect all valid requests
> to come in on. Any ideas on this appreciated, but my main question
is.....
>
> The problem I have currently is that when this error occurs it means no
> connections to the database can be made, and as such no pages can be
served,
> all content is database generated. When the error occurs, we have
> notifications setup so that we can restart the application, usually just
> resaving web.config. What I would like to be able to until I can actually
> trace the real cause of the problem, is be able to restart the asp.net
> application when this error is detected. I have tried using
> application.Dispose() which doesn't do what I am looking for. At the
moment
> the only approach I can see is "touching" the web.config file from my
> asp.net application, which should ensure the application reloads, however
> this seems a rather ugly way of achieving the result I am looking for.
>
> Any help much appreciated.
>
> Thanks,
>
> Matt
>
>
>
- Next message: Martin Dechev: "Re: missing text in a label"
- Previous message: Joy: "Script in body"
- In reply to: matt: "force reload of application from asp.net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|