4

Came across the following error in our logs when we've used PageMetaFactory to get meta information on a page:

Cannot release connection

From some digging this seems to be caused by an application trying to use a connection from the connection pool that's been idle beyond the timeout?

This got me thinking about the section in the storage config:

<Storage Type="persistence" Id="defaultdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
    <Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
    <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
        <Property Name="serverName" Value="COAIPDELIVDBP01" />
        <Property Name="portNumber" Value="xxx" />
        <Property Name="databaseName" Value="Tridion_Broker" />
        <Property Name="user" Value="xxxx" />
        <Property Name="password" Value="xxx" />
    </DataSource>
</Storage>

I've never had cause to change these beyond the defaults and wondered if these setting played a part in the error?

EDIT

Added complete storage node. We're running:

  • SQL Server 2008 R2 64bit
  • Windows Server 2008 R2
  • 64bit JRE 1.6.0 64bit

Cheers

Neil
  • 2,688
  • 1
  • 23
  • 32
  • I never had a cause to change these either and I haven't seen this error before. Could you please provide your environment details? (.net or java based, SQL Server or Oracle, jre version) etc. – Ram G Nov 06 '12 at 16:00
  • Also, could you share the entire Storage node please? – Quirijn Nov 06 '12 at 16:08
  • Updated original question as requested. – Neil Nov 07 '12 at 11:28

1 Answers1

1

Usually, an error like this comes from the fact that the IdleTimeout in your storage configuration is bigger that your Database IdleTimeout. What is IdleTimeout? It is the time-out on idle connections. If Tridion uses a connection that has been sitting idle in the connection pool beyond the database time-out period, then an exception is thrown. So, in your case, the explanation might be that Tridion is trying to use a database connection that has been close by the database server because it was idle for too long. To make sure this does not happen in the future, find-out what is the WaitTime defined at your database level and set the IdleTimeout to a value which is smaller or equal than that one (note that in the storage config this timeout is defined in seconds).

Hope this helps.

Regards, Daniel.

Daniel Neagu
  • 1,711
  • 11
  • 13
  • Thanks, I was thinking the same but am having difficulty tracking down SQL Server's database idle timeout. Any ideas? – Neil Nov 07 '12 at 11:28
  • @Neil: If I connect to my SQL Server instance (with Microsoft SQL Server Management Studio), if I go to "Server Properties", Connections I can see a checkBox "Allow remote connections to this server" and a Remote query timeout which for me is set by default to 600 seconds – Daniel Neagu Nov 07 '12 at 11:36