Related Documents
Document Properties
Last Modified
Added to KB
Public Access
Doc Type
Guidelines, Concepts & Cookbooks
ICM 7.10

Guide - 7.10.20+ Avoid MSSQL Reconnect Issues

Table of Contents

Product Version


Product To Version


1 Introduction

Most reconnection issues with the MSSQL Database are caused by too many TCP connections to the database. The SQL server has no free ports during the connection setup phase. The error looks like

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption.

The follow changes can reduce the number of failed connection setups for the application code:

  1. Enable reconnect in case of a failure
  2. Reduce the number of new connections by configuring (optimizing) the JDBC-connection pool

2 Enable Reconnect

Since version 9.4.0 the JDBC driver contains an additional parameter for reconnect.

The mssql-jdbc driver is updated in all LTS versions of ICM. To improve the rollout speed of the change, the project can apply a version filter to update the library without updating the whole project. Please keep in mind to remove the "patch" after migrating to the latest LTS version.

LibraryOld VersionNew Version


Following adaptions are recommended:


See the documentation of the jdbc-driver to configure the reconnect capability.

2.1 How to get the used version

All libraries are listed at <IS_SHARE>/ivy.xml. The line can be found easily.

cat ivy.xml | grep "mssql-jdbc"

<dependency org="" name="mssql-jdbc" rev="9.4.0.jre8" conf="development-cartridges, production-cartridges, test-cartridges" transitive="false"/>

2.2 Availability in ICM versions



2.3 Version Provider

In case the project can't update to an newer ICM soon. The version can be defined at project too. The project can declare a specific filter for project-specific dependencies, please add this section to the build.gradle of the customization. The build.gradle can contain the following block:

versionRecommendation {
    provider {
        // thirdparty.version to resolve version conflicts of custom cartridges
        properties('thirdparty', file('thirdparty.version')) {}

Afterwards versions can be adapted in the Java-like property file:


The documented version of the JDBC driver could be updated meanwhile. See Keep in mind that the version needs to have a JRE8 extension.

3 Configuration JDBC Connection Pool

ICM uses an Apache connection pool which has 3 important configurations:

intershop.jdbc.mssql.dbcp.pool.MaxIdleIn case the pool has more than this amount of idle connections, the pool will automatically close connections, which are "closed" by the application.516
intershop.jdbc.mssql.dbcp.pool.MinIdleIn case the pool has less than this amount of idle connections, the pool will automatically create new connections without an explicit connection request54
intershop.jdbc.mssql.dbcp.pool.MaxTotalMax amount of connections handle by the pool150150

The value of MaxIdle should be significant larger than MinIdle, so that used connections can be stored in the pool without closing them. The MinIdle value can be increased in case the application needs very fast a larger amount of connections.


The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources