Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make timeouts configurable #62

Closed
jordansissel opened this issue Oct 20, 2015 · 2 comments
Closed

Make timeouts configurable #62

jordansissel opened this issue Oct 20, 2015 · 2 comments
Assignees

Comments

@jordansissel
Copy link
Contributor

Currently, the timeouts (I think?) are hard-coded within Sequel to be 5 seconds. It could be useful to have this be configurable.

@talevy talevy self-assigned this Oct 21, 2015
talevy added a commit to talevy/logstash-input-jdbc that referenced this issue Oct 21, 2015
Sequel supports various vendor-specific and connection-pool-specific
options that were not exposed to the plugin. This change introduces
a dedicated new configuration option to set a timeout and also a
catch-all configuration option for any other options that Sequel
supports upon opening a new database connection.

Fixes logstash-plugins#62.
talevy added a commit to talevy/logstash-input-jdbc that referenced this issue Oct 21, 2015
Sequel supports various vendor-specific and connection-pool-specific
options that were not exposed to the plugin. This change introduces
a dedicated new configuration option to set a timeout and also a
catch-all configuration option for any other options that Sequel
supports upon opening a new database connection.

Fixes logstash-plugins#62.
@talevy talevy closed this as completed in 22534db Oct 21, 2015
suyograo pushed a commit to suyograo/logstash-input-jdbc that referenced this issue Oct 21, 2015
Sequel supports various vendor-specific and connection-pool-specific
options that were not exposed to the plugin. This change introduces
a dedicated new configuration option to set a timeout and also a
catch-all configuration option for any other options that Sequel
supports upon opening a new database connection.

Fixes logstash-plugins#62.

Fixes logstash-plugins#64
@ppf2
Copy link
Member

ppf2 commented Oct 21, 2015

Thanks for the quick turnaround on this @talevy !

@ppf2
Copy link
Member

ppf2 commented Oct 22, 2015

There is an issue in this PR which I can reproduce. With the plugin updated (and even without specifying the new jdbc connection pool timeout property), it is failing at sequel/adapters/jdbc.rb:216:

props.setProperty("password", opts[:password])

If I hardcode the password string instead of opts[:password] directly in the sequel code above, it works fine. If opts[:password] is passed in, then it throws the exception:

The error reported is: 
  TypeError: cannot convert instance of class org.jruby.RubyObject to class java.lang.String
/Users/Pius/ELK/logstash-1.5.3/vendor/bundle/jruby/1.9/gems/sequel-4.27.0/lib/sequel/adapters/jdbc.rb:216:in `connect'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants