Synchronize Multiple jdbc inputs - Pool session error

I am using multiple jdbc inputs :

jdbc {
	jdbc_driver_library => "../vendor/oracle/ojdbc7.jar"
	jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
	connection_retry_attempts => 10
	connection_retry_attempts_wait_time => 5
	jdbc_validate_connection => "true"
	jdbc_connection_string => "connectionString/myDataBase"
	jdbc_user => "USER_NAME"
	jdbc_password => "PASSWORD"
	schedule => "* * * * *"
	statement_filepath => "myPath/queryA.sql"
	tracking_column => "myTrackingcolumn"
	last_run_metadata_path => "myPath/.logstash_jdbc_last_run"
	type => "documentType"
	add_field => {
		  "tag" => "myTag"
		  }
   }

jdbc {
	jdbc_driver_library => "../vendor/oracle/ojdbc7.jar"
	jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
	connection_retry_attempts => 10
	connection_retry_attempts_wait_time => 5
	jdbc_validate_connection => "true"
	jdbc_connection_string => "connectionString/myDataBase"
	jdbc_user => "USER_NAME"
	jdbc_password => "PASSWORD"
	schedule => "* * * * *"
	statement_filepath => "myPath/queryB.sql"
	tracking_column => "myTrackingcolumn"
	last_run_metadata_path => "myPath/.logstash_jdbc_last_run"
	type => "documentType"
	add_field => {
		  "tag" => "myTag"
		  }
   }

jdbc {
	jdbc_driver_library => "../vendor/oracle/ojdbc7.jar"
	jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
	connection_retry_attempts => 10
	connection_retry_attempts_wait_time => 5
	jdbc_validate_connection => "true"
	jdbc_connection_string => "connectionString/myDataBase"
	jdbc_user => "USER_NAME"
	jdbc_password => "PASSWORD"
	schedule => "* * * * *"
	statement_filepath => "myPath/queryC.sql"
	tracking_column => "myTrackingcolumn"
	last_run_metadata_path => "myPath/.logstash_jdbc_last_run"
	type => "documentType"
	add_field => {
		  "tag" => "myTag"
		  }
   }

When I only use two of them, everything works fine but when I use all of them I got the following error :

Pipeline aborted due to error {:exception=>"Sequel::DatabaseConnectionError", :backtrace=>    ["oracle.jdbc.driver.T4CT
    TIoer.processError(oracle/jdbc/driver/T4CTTIoer.java:450)", "oracle.jdbc.driver.T4CTTIoer.processError(oracle/jdbc/driver/T4CTTIoer.java:392)",
    "oracle.jdbc.driver.T4CTTIoer.processError(oracle/jdbc/driver/T4CTTIoer.java:385)", "oracle.jdbc.driver.T4CTTIfun.processError(oracle/jdbc/driver/T4CTTIfun.java:938)",
    "oracle.jdbc.driver.T4CTTIoauthenticate.processError(oracle/jdbc/driver/T4CTTIoauthenticate.java:480)", "oracle.jdbc.driver.T4CTTIfun.receive(oracle/jdbc/driver/T4CTTIfun.java:655)",
    "oracle.jdbc.driver.T4CTTIfun.doRPC(oracle/jdbc/driver/T4CTTIfun.java:249)", "oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(oracle/jdbc/driver/T4CTTIoauthenticate.java:416)",
    "oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(oracle/jdbc/driver/T4CTTIoauthenticate.java:825)", "oracle.jdbc.driver.T4CConnection.logon(oracle/jdbc/driver/T4CConnection.java:596)",
    "oracle.jdbc.driver.PhysicalConnection.<init>(oracle/jdbc/driver/PhysicalConnection.java:715)", "oracle.jdbc.driver.T4CConnection.<init>(oracle/jdbc/driver/T4CConnection.java:385)", 
    "oracle.jdbc.driver.T4CDriverExtension.getConnection(oracle/jdbc/driver/T4CDriverExtension.java:30)", "oracle.jdbc.driver.OracleDriver.connect(oracle/jdbc/driver/OracleDriver.java:564)", 
    "RUBY.connect(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/adapters/jdbc.rb:222)", 
    "RUBY.make_new(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool.rb:116)", 
    "RUBY.make_new(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:228)", 
    "RUBY.available(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:201)",
    "RUBY._acquire(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:137)", 
    "RUBY.acquire(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:151)", 
    "RUBY.sync(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:282)", 
    "org.jruby.ext.thread.Mutex.synchronize(org/jruby/ext/thread/Mutex.java:149)", "RUBY.sync(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:282)", 
    "RUBY.acquire(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:150)", 
    "RUBY.hold(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/connection_pool/threaded.rb:106)", 
    "RUBY.synchronize(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/database/connecting.rb:256)", 
    "RUBY.test_connection(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/sequel-4.37.0/lib/sequel/database/connecting.rb:266)", 
    "RUBY.prepare_jdbc_connection(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.1.0/lib/logstash/plugin_mixins/jdbc.rb:173)", 
    "RUBY.register(myPath/logstash-2.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-3.1.0/lib/logstash/inputs/jdbc.rb:187)", ...

It seems related to the limited number of sessions permitted to the user I am using to connect to the database(s).
How can I avoid this kind of errors ? I tried setting the jdbc_validate_connection => "true" and launching the logstash instance with only one pipeline worker using the -w option but this doesn't solve the problem.

Is it possible to configure logstash so it uses only one session and launches the queries sequentially ?

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