-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
Setting socketTimeout=10 in the JDBC url by using passwordless has no effect
spring.datasource.url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}?socketTimeout=10
Exception or Stack Trace
Exception java.lang.Exception: Apparent connection leak detected is thrown after the configured 15s. But there should be a SocketTimeoutException after 10s.
To Reproduce
Simpel Spring Starter with spring-data-jpa
Code Snippet
spring:
cloud:
azure:
credential:
managed-identity-enabled: true
client-id: ${AZURE_CLIENT_ID}
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=require&socketTimeout=10
username: ${DB_USERNAME}
hikari:
connection-timeout: 5000 #5s
leak-detection-threshold: 15000 #15s
maximum-pool-size: 5
minimum-idle: 2
azure:
passwordless-enabled: trueExpected behavior
After 10s the SocketTimeoutException should be thrown. By removing the passwordless feature this is the case.
Setup (please complete the following information):
- Library/Libraries: com.azure.spring:spring-cloud-azure-starter-jdbc-postgresql:6.1.0
- Java version: 25
- Frameworks: Spring Boot 3.5.10
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Bug Description Added
- Repro Steps Added
- Setup information Added
Metadata
Metadata
Labels
Type
Projects
Status