I'm using Logstash to import a lot of data from a MySQL database. I'm facing a java.lang.OutOfMemoryError: Java heap space
error.
After a few searches I found out a good solution is to enable paging (here) and set jdbc_page_size
.
In the current conf I use, the jdbc_fetch_size
is already set.
Now, my questions are:
- What are the differences between those two parameters?
- Do they interact? In a opposite or similar way?
The info I gathered so far are:
- this topic asking if :
jdbc_page_size determines the number of rows that are fetched from database per trip
- And this one, about hibernate, stating that:
hibernate.jdbc.fetch_size
determines the number of rows fetched when there is more than a one row result on select statements
And of course logstash doc
Can anyone clarify it?