logstash-plugins / logstash-input-jdbc

Logstash Plugin for JDBC Inputs
Apache License 2.0
449 stars 187 forks source link

Logstash keeps making the connections to the db #391

Open edvinas31 opened 1 year ago

edvinas31 commented 1 year ago

Logstash information:

Please include the following information:

  1. Logstash version (e.g. bin/logstash --version) 8.8.1
  2. Logstash installation source (e.g. built from source, with a package manager: DEB/RPM, expanded from tar or zip archive, docker) Docker https://hub.docker.com/layers/library/logstash/8.8.1/images/sha256-4482a4c08810f315dc8bf6ec45a702316a4c24fac3539ab1fe8774d0d0eada4c?context=explore
  3. How is Logstash being run (e.g. as a service/service manager: systemd, upstart, etc. Via command line, docker/kubernetes) Kubernetes
  4. How was the Logstash Plugin installed Using kubernetes job

JVM (e.g. java -version):

If the affected version of Logstash is 7.9 (or earlier), or if it is NOT using the bundled JDK or using the 'no-jdk' version in 7.10 (or higher), please provide the following information:

  1. JVM version (java -version)
  2. JVM installation source (e.g. from the Operating System's package manager, from source, etc).
  3. Value of the JAVA_HOME environment variable if set.

OS version (uname -a if on a Unix-like system): Linux logstash-statefulset-0 5.15.0-1045-oracle #51-Ubuntu SMP Fri Sep 22 10:55:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior: We are stopping our kubernetes workers every evening. When we start it next morning we experiencing that logstash keeps creating a lot of inactive connections to the db. This leads to our database being overloaded with connections and eventually es-db restarts.

Steps to reproduce:

Please include a minimal but complete recreation of the problem, including (e.g.) pipeline definition(s), settings, locale, etc. The easier you make for us to reproduce it, the more likely that somebody will take the time to look at it.

  1. Deploy our solution with helm (db, logstash and other prerequisites)
  2. Stop the kubernetes workers which are having logstash and db pods inside of it
  3. Start the kubernetes worker nodes
  4. Inactive connections start apearing in the db when running query select * from v$session : image

Provide logs (if relevant):