Database Connection Closed

Posted by Community Admin on 03-Aug-2018 01:07

Database Connection Closed

All Replies

Posted by Community Admin on 22-Oct-2010 00:00

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

Posted by Community Admin on 22-Oct-2010 00:00

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

Posted by Community Admin on 22-Oct-2010 00:00

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:
http://www.telerik.com/help/openaccess-orm/idle-connection-testing.html

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

Posted by Community Admin on 22-Oct-2010 00:00

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

Posted by Community Admin on 17-Dec-2010 00:00

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

Posted by Community Admin on 22-Dec-2010 00:00

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

Posted by Community Admin on 14-Feb-2011 00:00

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

Posted by Community Admin on 17-Feb-2011 00:00

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

Posted by Community Admin on 26-Feb-2011 00:00

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.

Posted by Community Admin on 02-Mar-2011 00:00

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?

Posted by Community Admin on 02-Mar-2011 00:00

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

Posted by Community Admin on 24-Mar-2011 00:00

Do you have an estimation about when the SP1 released?

Will ticket 103780 correction be a part of this SP?

Tks,

Antonio Meireles

Posted by Community Admin on 25-Mar-2011 00:00

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

This thread is closed