One Star

[resolved] Error: Exception in thread "main" java.lang.OutOfMemoryError: Java hea

Hi,
We are getting the below error while executing the Job in talend.
DataBase: MS Sql server 2012
Scenario: Let say we have a table X and then we are doing a self join on this table for approx 14 times and then pulling out the data. If we execute the full query on sql server the data comes out in 7 mins but if we break each component in talend i.e. using 14 tmssqlinput and put a join in tmap after loading the data below below error is shown and the Job fails.
Warning: to avoid a Memory heap space error the buffer of the flow has been limited to a size of 170598 , try to reduce the advanced parameter "Max buffer size" (~100000 or at least less than 170598), then if needed try to increase the JVM Xmx parameter.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
disconnected
at java.lang.StringCoding$StringDecoder.decode(Unknown Source)
at java.lang.StringCoding.decode(Unknown Source)
at java.lang.StringCoding.decode(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at local.j_stg_smart_version_0_1.j_stg_smart_version$1SortableRow_tMap_1_9.readData(j_stg_smart_version.java:19691)
at org.talend.designer.components.lookup.persistent.PersistentRowSorterIterator.findNextData(PersistentRowSorterIterator.java:421)
at org.talend.designer.components.lookup.persistent.PersistentRowSorterIterator.next(PersistentRowSorterIterator.java:318)
at local.j_stg_smart_version_0_1.j_stg_smart_version.tMSSqlInput_1Process(j_stg_smart_version.java:61629)
at local.j_stg_smart_version_0_1.j_stg_smart_version.runJobInTOS(j_stg_smart_version.java:15169)
at local.j_stg_smart_version_0_1.j_stg_smart_version.main(j_stg_smart_version.java:14203)
Job j_stg_smart_version ended at 19:22 16/06/2014.

Please let me know how to increase the size of XMS and XMX, as when we increase the size the Job fails and gives following error.
Error when running jobs :
"Could not create the Java virtual machine.
Error occurred during initialization of VM
Could not reserve enough space for object heap"

Please let me know the solution of the above issues that we are facing.
Thanks
RT
1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: [resolved] Error: Exception in thread "main" java.lang.OutOfMemoryError: Java hea

Hi,
Could not reserve enough space for object heap

For this error, please refer to this KB article about TalendHelpCenter:Exception Could not reserve enough space for object heap and TalendHelpCenter?Exception outOfMemory.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
2 REPLIES
One Star

Re: [resolved] Error: Exception in thread "main" java.lang.OutOfMemoryError: Java hea

Talend also provides not only ETL but also ELT functionality for MSSQL. With ELT you can model a Talend job with one component per table you want to join (tELTMSSqlInput), one mapping component (tELTMSSqlMap) and one Table as output component (tELTMSSqlOutput) but the DBMS will do the join. The caveat is that the output therefore has to be a database table as well.
On a sidenote: tMap has a feature to use the disk space for temporary data. This will prevent the outofmemoryerror, but it will make the job slower than doing the join completely in memory.
Moderator

Re: [resolved] Error: Exception in thread "main" java.lang.OutOfMemoryError: Java hea

Hi,
Could not reserve enough space for object heap

For this error, please refer to this KB article about TalendHelpCenter:Exception Could not reserve enough space for object heap and TalendHelpCenter?Exception outOfMemory.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.