Jdbc input plugin with scheduler opens 96 extra connections to Oracle


I am using ES 5.1.1 LS 5.1.1 and logstash-input-jdbc (4.1.3)

With the following input config:
input {
jdbc {
# Oracle jdbc connection string to Oracle database
jdbc_connection_string => "jdbc:oracle:thin:@//host:port/sid"
# The user we wish to execute our statement as
jdbc_user => "user"
jdbc_password=> "password"
# The path to our downloaded jdbc driver
jdbc_driver_library => "path/lib/ojdbc7.jar"
# The name of the driver class for Oracle
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_validate_connection => true
# our query
statement => "select * from es_etl_log where status='N'"
type => "es_etl_start"
schedule => "* * * * *"

I got 97 connections to the Oracle DB after starting LS. If I comment out the "schedule", then there is only 1 connection.
Is there any solution to this?


Problem solved.

The problem is not the input plugin, but the jdbc output plugin.
Defaul maximumPoolSize actually is 24. Not 5 as the doc says.

I have 1 JDBC input and 4 JDBC outputs, so 1 + 24*4=97.
In my case, I do not need pooling since there is only 1 user.

maximumPoolSize =>1

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.