-
Notifications
You must be signed in to change notification settings - Fork 187
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
jdbc_fetch_size no effect? #103
Comments
This isn't working for me either using postgresql. Looking at the postgres documentation, the code needs to explicitly set the connection autocommit mode to false e.g. conn.setAutoCommit(false); For data size of 10 million plus, this is a must (jdbc_paging_enabled is too slow). |
Can this be prioritized please? |
thanks for the issue, we'll get this soon. |
fixed? |
I guess pagination could be made faster if the following statement is executed: I use this trick to iterate through millions of records and its quite fast, the only thing to be solved is getting the last id and use it as a variable inside the plugin. |
This was committed in #108 and can be gained by updating to version 3.0.0 of the plugin. Some interim documentation: #57 (comment) |
Many tables don't have the last ID column. What about the jdbc_fetch_size fix please? |
+1, please fix! The paging is slower and because of the way that the count query is implemented for paging(just by wrapping the defined statement) I am seeing Incorrect Key File errors in MySQL. An alternative might also be allowing a way to define the count query statement? Let me know if I can do anything to help. Thank you for your hard work on this project! |
Serious problem for me too. This plugin does not work with postgresql driver and full import of big tables. Allways results in an OutOfMemoryError due to the reason that jaykay153 has given. |
Workaround is not to use the official postgresql drivers but this one here: |
It seems that an additional parameter |
It sounds as though the logstash jdbc plugin itself can't force the connection to use a cursor for fetching rows; you need to tell the JDBC driver to do it. That's okay. However! It would be very very helpful if the plugin raised a big warning if you try to set jdbc_fetch_size and your connection doesn't support it. Or at least mention this in the documentation. For MySQL users, @axhiao is right; using useCursorFetch=true in your connect string lets you import all the rows without problem. |
Trying to do a big load from redshift (10's of millions of rows) into elasticsearch. Gave logstash 12G of heap and it still ran out of memory. jdbc_fetch_size was set to 10000 - it looks like this bug is my problem. Also looks like for redshfit, there are no driver configuration options that let you set autocommit to off. http://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-options.html You get an error from your SQL if you try to using
Is it possible to have the JDBC input set AutoCommit(false) whenever Any other ideas for how to get large amounts of data out of Redshift and into ES using logstash without running out of memory? |
@rspuler is pgjdbc-ng still working? I got error message like:
It seems that logstash jdbc input plugin does not support pgjdbc-ng |
Any way to deal with this (Postgres)? Like @jaykay153 said, the official driver doesn't set
That being said a simple |
What about oracle , how to change fetch size from the jdbc connection string. Any update on this issue !!?! |
logstash 1.5.5
jdbc 1.0.0
error log:
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid24312.hprof ...
Heap dump file created [1159466364 bytes in 21.477 secs]
i read
https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#plugins-inputs-jdbc-jdbc_page_size
add parameter jdbc_fetch_size.
but,no effect.
I want to increase memory?
The text was updated successfully, but these errors were encountered: