Open kaisecheng opened 6 months ago
A workaround is enabling jdbc_validate_connection
and set the jdbc_validation_timeout
to a smaller interval value compared to the schedule option
for example a scheduler runs for every minute, jdbc_validation_timeout
should be smaller than 60 seconds.
schedule => "* * * * *"
jdbc_validate_connection => true
jdbc_validation_timeout => 55 # 55 seconds
Similar issue to https://github.com/logstash-plugins/logstash-integration-jdbc/issues/143 , https://github.com/logstash-plugins/logstash-integration-jdbc/issues/152 , this time is Sybase. ~The upstream Sequel driver is affected by a connection issue as described in https://github.com/jeremyevans/sequel/issues/2159~ Sequel lib doesn't support Sybase, hence, the plugin needs special handling for Sybase to solve this issue.
This problem is caused when a connection gets closed by Sybase (idle sessions, workload rules, network issues, etc.) Logstash should gracefully recover from those errors, discarding the stale connection and reconnecting the client. Instead, the plugin hangs trying to reuse the closed/invalid connections.