1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Database Connection Closed

Database Connection Closed

13 posts, 1 answered
  1. Matt
    Matt avatar
    56 posts
    Registered:
    20 Nov 2009
    22 Oct 2010
    Link to this post
    Hello,

    I noticed after a brief loss of connectivity to the database, the application does not recover on its own and reports the following error until it is restarted:
    
    
    [InvalidOperationException: Invalid operation. The connection is closed.]
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery() +267
       OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery() +53
       OpenAccessRuntime.Relational.fetch.FetchResultImp.execute() +60
    
    
    Is this connection pool behavior configurable, or just something unique to the beta version that may be resolved in the final release?  Not a big deal for the time being, just wondering if there's anything we can do about it on our end.

    Thanks,
    Matt

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    22 Oct 2010
    Link to this post
    Hello Matt,

    By default the application pool goes down( going to "sleep" mode) after you reach the  Idle time out of the Process model. Then, when you make a request to the website it should be re initialized.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Matt
    Matt avatar
    56 posts
    Registered:
    20 Nov 2009
    22 Oct 2010
    Link to this post
    Ivan,

    I just thought the closed connections should be automatically dropped from the connection pool and replaced with new connections, so the application can recover on it's own from a temporary loss of connectivity to the database (a database restart, for example).  This page seems to describe the behavior I'm looking for:

    It seems my installation of Sitefinity is not testing and discarding bad connections in the background.  Is there any place where I can customize the database connection pool settings, or is this not possible in the current release?  You mentioned the application pool, but I was referring to the database connection pool...

    Thanks,
    Matt
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    22 Oct 2010
    Link to this post
    Hello Matt,

    We use the default OA connection settings. Currently we do not expose settings that allow you to manage OA connection pool configuration.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  5. Matt
    Matt avatar
    56 posts
    Registered:
    20 Nov 2009
    17 Dec 2010
    Link to this post
    Ivan,

    I've been monitoring this issue for a while since we first had the problem, and I wanted to bring it back up and ask if there is any new progress on allowing us to modify the connection pool settings.  I want to reiterate that I have NEVER used an application with a database connection pool that doesn't know how to recover from a temporary loss of database connectivity by automatically dropping closed connections from the pool.  We just restarted the database on our production server, and all of our applications handled it just fine, except Sitefinity, which required us to go out and touch the web.config file to force a reload (See attached screenshot of the error).

    Might seem like a trivial problem that won't happen under normal conditions, but this will make the difference between me sleeping peacefully through the night, or waking up to login and restart the website after the DBA reboots the database server.  In addition it will result in a significantly larger amount of downtime while nobody knows that connectivity has been lost until it's reported by an end user.

    Waiting for the application to go idle and recover on it's own is not feasible, as it won't go to sleep if there are constant requests coming in.  Can you give me any other solution to this problem?

    Thanks,
    Matt

  6. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    22 Dec 2010
    Link to this post
    Hi Matt,

    Yes, this is an important issue. We will investigate the problem and will fix it for the official release.

    Kind regards,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Le Corbu
    Le Corbu avatar
    16 posts
    Registered:
    27 Apr 2006
    14 Feb 2011
    Link to this post
    Hi Vlad,

    seems to be still a problem in release (4.0.1141.0).
    And I agree - "this is an important issue".

    Kind regards
    Udo
  8. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    17 Feb 2011
    Link to this post
    Hi Le Corbu,

    Unfortunately, we didn't manage to address this problem in the official release.
    Currently this is a know issue (ID: 103780), which is in process of investigation.

    We can provide a temporary workaround. However it brings some overhead to the application.

    1. Add Telerik.OpenAccess.Config.dll to the bin folder (in the attached zip)
    2. Add the following configuration in the web.config

    Copy Code
    <configuration>
      <configSections>
     ..
        <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config"/>
      </configSections>
      ...
      <openaccess>
        <backendconfigurations>
          <backendconfiguration id="mssqlConfiguration" backend="mssql">
            <mappingname>mssqlMapping</mappingname>
            <testOnAlloc>true</testOnAlloc>
          </backendconfiguration
        </backendconfigurations>
      </openaccess>
    </configuration>

    We are sorry for the inconvenience.

    Greetings,
    Vlad
    the Telerik team
  9. Ed Sirijintakarn
    Ed Sirijintakarn avatar
    19 posts
    Registered:
    02 Feb 2010
    26 Feb 2011
    Link to this post
    Will this be addressed in the upcoming SP1?  Has happened to us twice since release:

    Exception information:
        Exception type: InvalidOperationException
        Exception message: Invalid operation. The connection is closed.
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
       at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
       at OpenAccessRuntime.Relational.fetch.FetchResultImp.execute()

    Thanks,
    Ed Sirijintakarn
    Internetiks, Inc.
  10. Shawn
    Shawn avatar
    79 posts
    Registered:
    01 Jun 2010
    02 Mar 2011
    Link to this post
    How much overhead does the workaround add?  This error has happened to me twice today.  I'm already running in a shared hosting environment which is slow. Will it be corrected in sp1?
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    02 Mar 2011
    Link to this post
    Hello Shawn,

    We made some changes to the code, so I believe that the issue will be fixed with SP1 that should be released this week.

    Greetings,
    Ivan Dimitrov
    the Telerik team
  12. Antonio
    Antonio avatar
    1 posts
    Registered:
    24 Mar 2011
    24 Mar 2011
    Link to this post
    Do you have an estimation about when the SP1 released?

    Will ticket 103780 correction be a part of this SP?

    Tks,

    Antonio Meireles
  13. Preetham Reddy
    Preetham Reddy avatar
    57 posts
    Registered:
    16 Jul 2012
    25 Mar 2011
    Link to this post
    My website would go down once in every 2- 3 days  and I get a call from my end users and it's very embarrasing to answer the question....

    I upgraded the website to SP1 couple of weeks ago and after that it went down in the first couple of days but lately I haven't had any problem...

    Hopefully, that problem is fixed now...

    I will report back if I still have the same issue...
13 posts, 1 answered