Hi Team,
We are facing intermittent Java/JDBC socket errors after routing application traffic through ProxySQL.
Environment:
- ProxySQL version: 3.0.8-481-g0ef544c
- OS: Ubuntu 24.04
- Backend DB: MariaDB 11.8.6
- JDBC driver: org.mariadb.jdbc.Driver
- Application framework: Spring Boot / Hibernate / HikariCP
- Topology: Application -> Load Balancer -> ProxySQL -> MariaDB
- ProxySQL frontend port: 6033
- Backend writer hostgroup: 10
- Reader hostgroup: 20
- mysql-multiplexing: true
- mysql-enable_server_deprecate_eof: true
- Application uses Hibernate batching: yes
Issue:
After routing Java application traffic through ProxySQL, normal DB connectivity works, and simple SELECT/INSERT/UPDATE queries succeed. However, during application create/update flows, the application intermittently fails with JDBC socket errors.
Application-side error:
java.sql.SQLNonTransientConnectionException: Socket error
Caused by:
java.io.EOFException: unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
ProxySQL log shows:
MySQL_Session.cpp:4808:handler___status_NONE_or_default(): [ERROR] Unexpected packet from client <app_client_ip>. Session_status: 6 , client_status: 0 Disconnecting it
Also:
MySQL_Thread.cpp:4398:ProcessAllSessions_Healthy0(): [WARNING] Closing unhealthy client connection <app_client_ip>:
Validation already done:
- Direct connection to ProxySQL frontend works.
- SELECT through ProxySQL works.
- INSERT through ProxySQL works.
- UPDATE through ProxySQL works.
- Transaction + rollback through ProxySQL works.
- Same DB-level tests through Load Balancer -> ProxySQL also work.
- ProxySQL monitor logs show backend servers healthy.
- No backend MariaDB connection errors during simple DB tests.
The issue appears only during full Java/Hibernate application flows, especially create/update order operations.
Question:
Is this a known issue with ProxySQL multiplexing and Java/Hibernate/MariaDB JDBC batching?
Is disabling multiplexing for the affected application user the recommended approach, or should Hibernate batching be disabled instead?
Hi Team,
We are facing intermittent Java/JDBC socket errors after routing application traffic through ProxySQL.
Environment:
Issue:
After routing Java application traffic through ProxySQL, normal DB connectivity works, and simple SELECT/INSERT/UPDATE queries succeed. However, during application create/update flows, the application intermittently fails with JDBC socket errors.
Application-side error:
java.sql.SQLNonTransientConnectionException: Socket error
Caused by:
java.io.EOFException: unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
ProxySQL log shows:
MySQL_Session.cpp:4808:handler___status_NONE_or_default(): [ERROR] Unexpected packet from client <app_client_ip>. Session_status: 6 , client_status: 0 Disconnecting it
Also:
MySQL_Thread.cpp:4398:ProcessAllSessions_Healthy0(): [WARNING] Closing unhealthy client connection <app_client_ip>:
Validation already done:
The issue appears only during full Java/Hibernate application flows, especially create/update order operations.
Question:
Is this a known issue with ProxySQL multiplexing and Java/Hibernate/MariaDB JDBC batching?
Is disabling multiplexing for the affected application user the recommended approach, or should Hibernate batching be disabled instead?