Re: force reload of application from asp.net

From: Steve Drake (Steve_at_NOSPAMDrakey.co.uk)
Date: 03/03/04


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
>
>
>



Relevant Pages

  • RE: DbDataReadet.GetOrdinal() - duplicate column name
    ... For different database, ... different connections (SQLConnection, OLEDBConnection,ODBCConnetion) and ... abstract them as DBConnection. ...
    (microsoft.public.dotnet.framework.adonet)
  • Single connection or not ?
    ... SqlConnection for each database calls, or one longer SqlConnection used by ... and GetUserInfos() and GetUserItemsboth are implemented like this: ... I guess two connections are being opened and closed. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How can I open an SQL database and be the only one who has access to it?
    ... you can determine how SS permits access to your server. ... SINGLE_USER allows one user at a time to connect to the database. ... controlled by the termination clause of the ALTER DATABASE statement. ... To allow multiple connections, the database must be changed to ...
    (microsoft.public.data.ado)
  • Re: ORA-12518, 04030 errors after 9i-10G upgrade.
    ... All went ok until users started connecting in 100+ numbers, database is ... set up for dedicated server connections, this was never a problem in 9i. ... This did not solve problems so bounced database and decreased SGA to ... out of process memory errors. ...
    (comp.databases.oracle.server)
  • Re: ORA-12518, 04030 errors after 9i-10G upgrade.
    ... All went ok until users started connecting in 100+ numbers, database is ... set up for dedicated server connections, this was never a problem in 9i. ... out of process memory errors. ... that Oracle is having issues with OS resources. ...
    (comp.databases.oracle.server)