You are not logged in.

Unanswered posts

#1 2013-08-20 12:03:33

kumar.talend
Member
177 posts

kumar.talend said:

[resolved] java.lang.OutOfMemoryError: Java heap space

Tags: [PostgreSQL]

Hi All.

One Table have 4million rows.
I am Exporting 4million rows to csv file i am getting below error.

"Exception in thread "main" java.lang.OutOfMemoryError: Java heap space"

How to increase Java heap space?

Thanks
kumar.talend

Offline

#2 2013-08-20 13:14:11

tal00000
Member
259 posts

tal00000 said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

You can increase the heap from the Run->Advanced settings tab. You can also pass parameters etc, if not running in the dev environment. This is not always the best option.

What's your source? If it's MySQL, you can stream the data, for example.


www.TalendByExample.com
A site about Talend

Offline

#3 2013-08-20 13:20:49

kumar.talend
Member
177 posts

kumar.talend said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

HI tal00000
Thanks for your feedback.

My Source is postgressql.

I increased JVM size : -Xmx2048M
Again I am getting below error:

"Could not create the Java virtual machine.
Error occurred during initialization of VM
Could not reserve enough space for object heap"

Thanks
Kumar.talend

Offline

#4 2013-08-20 13:42:22

tal00000
Member
259 posts

tal00000 said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

I think that's your own local issue. You can Google to find why you're getting this message.

tPostgressInput->Advanced settings supports "Use cursor" and a solution may lie there.


www.TalendByExample.com
A site about Talend

Offline

#5 2013-08-20 18:03:08

kumar.talend
Member
177 posts

kumar.talend said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

HI tal00000
Thanks for your feedback.

tPostgressInput->Advanced settings supports "Use cursor".
check the Use cursor  check box and enter 5000000 in Box.

But same problem.
"Exception in thread "main" java.lang.OutOfMemoryError: Java heap space"

Any ideas.......

Thanks
kumar.talend

Offline

#6 2013-08-20 19:10:05

tal00000
Member
259 posts

tal00000 said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

try 1000 and see where that gets you

kumar.talend wrote:

HI tal00000
Thanks for your feedback.

tPostgressInput->Advanced settings supports "Use cursor".
check the Use cursor  check box and enter 5000000 in Box.

But same problem.
"Exception in thread "main" java.lang.OutOfMemoryError: Java heap space"

Any ideas.......

Thanks
kumar.talend


www.TalendByExample.com
A site about Talend

Offline

#7 2013-08-21 08:58:34

xdshi
Talend Team


xdshi said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi,

Hope these articles on talend help center will be useful for your job.
Exception+Could+not+reserve+enough+space+for+object+heap
Exception+outOfMemory.

Best regards
Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

#8 2013-08-22 14:46:05

kumar.talend
Member
177 posts

kumar.talend said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi Sabrina,

Thanks for your feedback.

I am modify the  "TOS_DI-win32-x86.ini" configuration file based on your suggested article.
No changes, i am getting same error.

"Exception in thread "main" java.lang.OutOfMemoryError: Java heap space"


Thanks.
kumar.talend

Offline

#9 2013-08-22 15:15:14

shong
Talend Team


shong said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi

I am modify the  "TOS_DI-win32-x86.ini" configuration file based on your suggested article.

The "TOS_DI-win32-x86.ini" configuration file is for Talend Studio application itself, not for the job execution, don't know which article or blob have you read, please refer to the KB article Exception+outOfMemory to learn how to allocate more memory to the job execution.

Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#10 2013-08-23 18:04:45

kumar.talend
Member
177 posts

kumar.talend said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi Shong,

Thanks for your feedback.


I am modify the  "TOS_DI-win32-x86.ini" configuration file through talend help center reference article.
and also I tried to increase heap size as per your suggested article.

I tried to increase heap size like below steps:

1)In   tMap  I  select the option Store on disk and given file path.

2) tPostgressInput->Advanced settings supports "Use cursor".
check the "Use cursor"  check box and i given  4000000  value.

In Both the case i am getting below error:

"Exception in thread "main" java.lang.OutOfMemoryError: Java heap space".

3)In the Run view, open the Advanced Settings tab and select the Use specific JVM arguments box
and i set the JVM arguments  like below:
                  -Xms512M
                  -Xmx2048M

   In the above  case i am getting below error.

"Could not create the Java virtual machine.
Error occurred during initialization of VM
Could not reserve enough space for object heap"


I tried to fix the OutofMemory issue all possible way.But it is escaping.

My job design.
tPostgressInput-->tMap-->tFileOutputDelimeted

Thanks to all for giving your valuable suggestions.

Thanks,
kumar.talend

Offline

#11 2013-08-24 10:19:43

camsellem
Talend Team


camsellem said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

You re running Talend on a 32 bits OS so you cant exceed 1536Mo for the JVM memory.

Please use the cursor option, but not with 5M value. Lower it to 100 000 rows. Should work.

Offline

#12 2013-09-04 10:10:25

Gapare
Guest

Gapare said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi guys,

I am having exactly the same error with the user above in Talend. Did someone find a solution to this as yet?

Your help is much appreciated as I am in the middle of a project.

Thanks and Regards,

AG

#13 2014-07-13 20:22:27

telena
Member
11 posts

telena said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi,
I had the same error and these posts were helpful.
In the Postgres input, 'Advanced Settings'  I set "use cursor" to 100 000.
In the Run 'Advanced Settings' I put both JVM arguments to Xms1024M and Xmx1024M.
It worked.

Last edited by telena (2014-07-13 20:24:27)

Offline

#14 2014-07-14 03:44:51

shong
Talend Team


shong said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi telena

Glad to see you figure it out and thanks for your feedback!

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the global leader of open source data management and application integration solutions!

Offline

#15 2015-02-05 10:18:10

mukuljain015
Guest

mukuljain015 said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

   xdshi wrote:

Hi,

Hope these articles on talend help center will be useful for your job.
Exception+Could+not+reserve+enough+space+for+object+heap
Exception+outOfMemory.

Best regards
Sabrina

Hey I want to generate data using java progam but i'm getting an error Exception in thread "main" java.lang.OutOfMemoryError: Java heap space. Can you plz help me

#16 2015-02-05 10:46:19

xdshi
Talend Team


xdshi said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi mukuljain015,

Hey I want to generate data using java progam but i'm getting an error Exception in thread "main" java.lang.OutOfMemoryError: Java heap space. Can you plz help me


Have you already changed your JVM arguments in  'Advanced Settings' of Run tab? Did this issue only repro on your specific job? Could you please give us more information about your current situation?


Best regards
Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

#17 2015-06-16 16:22:28

sbravo
Member
15 posts

sbravo said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi, i have the same problem but it happens when procesing a Delimited File with 381996 records. I tried setting the VM arguments of the job to -Xms1024M and Xmx1024M but still throws the Java Heap Space Exception. 


Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:2367)
	at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
	at java.lang.StringBuilder.append(StringBuilder.java:132)

Offline

#18 2015-06-17 05:22:06

xdshi
Talend Team


xdshi said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi sbravo,

What's your whole job design? Is there any DB component?Did you use any tMap, tUniqRow, tSortRow component in your work flow? What's the RAM of your machine?
Best regards
Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

#19 2015-07-02 13:41:44

cmadaka
Member
9 posts

cmadaka said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

other option you can try is selecting 'stream the file' in component view of the input file. (only for file based inputs)
Regards

Offline

#20 2015-07-02 14:46:24

ummed
Member
8 posts

ummed said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi,

I am using two source files (delimited .dat files ). Both the files have 2 million records . I am joining these files in tmap and sending the output to a flat file (.dat). but its giving me Java heap memory error after reading 1 lakh records.
I have tried all the options written in above comments ( tried increasing Xmx parameter, Store temp data =Yes), but still I am getting the error.

Can someone please suggest what should I Try.

Offline

#21 2015-07-02 14:56:33

Jcs19
Member
210 posts

Jcs19 said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

ummed wrote:

Hi,

I am using two source files (delimited .dat files ). Both the files have 2 million records . I am joining these files in tmap and sending the output to a flat file (.dat). but its giving me Java heap memory error after reading 1 lakh records.
I have tried all the options written in above comments ( tried increasing Xmx parameter, Store temp data =Yes), but still I am getting the error.

Can someone please suggest what should I Try.

You need to increase it again, or you just need more memory.
Check the task manager to see if you're RAM is full when you're running the job
mini_Untitled_20150702-1556.png

Last edited by Jcs19 (2015-07-03 08:55:11)

Offline

#22 2015-07-03 11:06:15

xdshi
Talend Team


xdshi said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi ummed,

Did you increase Xmx parameter in the Run 'Advanced Settings'which works for your current job not Talend Studio?
What's your OS and RAM?

Best regards
Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

#23 2015-07-09 16:52:55

ummed
Member
8 posts

ummed said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi Sabrina,

Thanks for your reply. Yes, I increased the Xmx parameter value in Run   'Advanced Settings' as well. I tried all the combinations (increasing it at Talend studio level, increasing at Run job level and increasing for both of them). My OS is windows 7 and RAM is 4 GB.

When I put this job on client server, it is running fine.
Q-1)  so I guess its RAM issue on my system, Please confirm .
But another problem is, its taking 15 minutes to join 2 flat files (3 million records in each file ) and write to target flat file.
Q-2) is there any way I can increase the performance?
One way I can think of is Parallelism , but it seems in Talend open studio we do not have option to do Parallelism ( its available in Talend Data integration ).
So before moving to Talend Data Integration, I want to do testing if how much it will improve the performance.
Q-3) Can you please let me know if there is any option to download trail version of Talend Data Integration so that I can do initial testing before moving to Talend Data Integration.

Offline

#24 2015-07-10 08:33:59

xdshi
Talend Team


xdshi said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi ummed,

As suggested, you need to optimaize the job deisgn and allocate more memory to the job execution.
Would you mind showing us your current job design screenshots?

Q-3) Can you please let me know if there is any option to download trail version of Talend Data Integration so that I can do initial testing before moving to Talend Data Integration.

You can download a free trial Talend Enterprise for Data Integration product from Talend Official Website:https://www.talend.com/enterprise-data-integration

Best regards
Sabrina


What we can do is to make sure that Talend will be your best choice!

Offline

#25 2015-07-14 16:53:24

ummed
Member
8 posts

ummed said:

Re: [resolved] java.lang.OutOfMemoryError: Java heap space

Hi,

I have installed Talend Enterprise edition from above link. And i got below icons on my computer in talend folder but all of them are only services. How do i start the  Talend to build any jobs( i don't see any icon for job developer) ? is there something missing in the installation?
Please suggest.

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy