I have some JDBC code (in a SpringBoot app) that works for a while, but after a couple hours, it crashes with "SQL Exception: Unexpected end of data".
I'm calling a REST endpoint on a Windows 2022 server which uses Spring connection pooling.
I have two testing apps that call the same JDBC code on the Windows server.
One app, the problem one, writes the file retrieved from the blob code to the Windows file system.
The other app, calling the exact same Windows service logic, but returning the byte stream back to the Mac and writing the file locally, works every time.
I thought it might be a timeout issue of some kind, but the Mac version of the testing code works every time.
The code is the same but the Tomcat installs are different. Could this be something with Connection Pooling with Tomcat on the server? The pool settings are in the Spring app so they're the same, but the Tomcat installs aren't.
My connection settings are (minus login and password...):
spring.datasource.tomcat.initial-size=15
spring.datasource.tomcat.max-wait=20000
spring.datasource.tomcat.max-active=100
spring.datasource.tomcat.max-idle=15
spring.datasource.tomcat.min-idle=8
spring.datasource.tomcat.default-auto-commit=true
spring.datasource.type=org.apache.tomcat.jdbc.pool.DataSource
Any ideas? I'll get more detail if requested.