Java Out Of Memory error while indexing data into elasticsearch

Hello ,
We are facing Java OOM issue while indexing data into elasticsearch .

We are reading close to 33 million records with 36 columns from Oracle database .We have broken data into 32 threads with every thread loading close to 1 million records .
We are using Bulk API and the bulk size is set to 10000 records .
Here are the details :

JVM heap size : 8 GB .
Java Version:1.6.0_45
JVM: Java HotSpot(TM) 64-Bit Server VM

Appreciate any pointers .

Thanks
Shishir

You could either reduce the number of threads or the bulk size?
Also, it sounds like you are using a very old version of elasticsearch as JAVA 1.6 is not supported anymore.

Could you consider upgrading?

We are using elastic version 1.1.1
Can you pls suggest which is most stable version I should upgrade to ?