Skip to content

Connection closed after a few seconds #2466

@JDBC-0

Description

@JDBC-0

Driver version

12.6.3

SQL Server version

Microsoft SQL Server 2019 (RTM-CU25-GDR) (KB5036335) - 15.0.4360.2 (X64) Mar 19 2024 00:23:01 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: ) (Hypervisor)

Client Operating System

Windows 10

JAVA/JVM version

17.0.8 LTS

Table schema

Provide the table schema to repro the issue.

Problem description

Connection gets lost.

Expected behavior

Connection stays alive until closed.

Actual behavior

After a few seconds, some SQL statements fail with
Die Verbindung wurde geschlossen. errorCode=0, message=Die Verbindung wurde geschlossen., SQLState=08S01, cause=null

Error message/stack trace

com.microsoft.sqlserver.jdbc.SQLServerException: Die Verbindung wurde geschlossen.
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:233)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:1848)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.checkClosed(SQLServerStatement.java:1146)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.setNull(SQLServerPreparedStatement.java:1723)
	at de.icomps.types.iCJDBCStatement.setNull(iCJDBCStatement.java:635)

Any other details that can be helpful

Occurs after a few seconds for some connections. Others work. All connections are build from the exact same JDBC URL:

jdbc:sqlserver://{DBSERVERADR};databaseName=amc;applicationName=MyApp;workstationID={HOSTID};integratedSecurity=true;sendStringParametersAsUnicode=false;useBulkCopyForBatchInsert=true;sendTemporalDataTypesAsStringForBulkCopy=false;connectRetryCount=30;connectRetryInterval=10;encrypt=false;loginTimeout=300;lockTimeout=3600000;queryTimeout=3600

JDBC trace logs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Closed Issues

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions