You are not logged in.

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

kumar.talend
Member

[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

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

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

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

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

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

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

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

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 leader of open source data management and application integration solutions!

Offline

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

kumar.talend
Member

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

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
Member

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

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

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 leader of open source data management and application integration solutions!

Offline

Board footer