• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Java heap space, simple job!

#1 2008-06-02 16:27:27

Caro
Member
Registered: 2008-05-06
Posts: 31

Java heap space, simple job!

Tags: [error, java, tos2.3.3]

My job is : tJDBCInput --> tFileDelimited
Ma database contains 5 000 000 records and I put following parameters : -Xms256m -Xmx2048m.

I have the error : outOfMemory : Java heap space. Why ?

Caro

Offline

#2 2008-06-03 07:52:43

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: Java heap space, simple job!

Hello

Go to Windows-->Preferences-->Talend-->Run/Debug and change the JVM arguments.

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

#3 2008-06-03 10:01:54

Caro
Member
Registered: 2008-05-06
Posts: 31

Re: Java heap space, simple job!

I already did that ! I put -Xmx2048M and it's the same thing. TOS is very greedy with memory!

Is it normal ?

Caro

Offline

#4 2008-06-03 10:32:31

amaumont
Talend team
Registered: 2006-09-20
Posts: 471

Re: Java heap space, simple job!

I think the JDBC component load all results into memory in place of load packet by packet.

Since TOS 2.4 RC we can set a cursor to limit data load with tOracleInput and tPostresqlInput. I hope this will help you.

Try to post more precision on the error if you have, such as stack trace with line number and location of error.

amaumont

Offline

#5 2008-06-03 11:18:49

Caro
Member
Registered: 2008-05-06
Posts: 31

Re: Java heap space, simple job!

Ok thanks a lot. I understand now why!
I hope future versions will have JDBC components with loading packet by packet. I think it will be better.

Regards,
Caro

Offline

#6 2008-06-03 20:09:49

mhirt
Talend team
Registered: 2006-09-19
Posts: 1633

Re: Java heap space, simple job!

Caro,

This functionality is not available for all JDBC drivers.
What database are you connecting to ?

Regards,

Offline

#7 2008-06-04 09:54:55

Caro
Member
Registered: 2008-05-06
Posts: 31

Re: Java heap space, simple job!

postgresql (version 1.8.2) and I use the driver postgresql-8.2-508.jdbc3.jar

Just to be sure : If I understand all, I can't load my data packet by packet in TOS 2.3.3 and it's possible in TOS 2.4 RC with tOracleInput and tPostresqlInput. Is it correct ?
Can I expect you will make the same thing with tJDBCInput in future version ?
Because, I think it's very annoying for an ETL if it can't read several millions of lines in a database.

Thanks
Caro

Offline

#8 2008-06-04 10:48:15

mhirt
Talend team
Registered: 2006-09-19
Posts: 1633

Re: Java heap space, simple job!

For me your request is not logical.
tJDBC is a generic component so we can't implement a driver specific feature like the cursor.

The correct request is : can you use the last official driver in the postgres component
And this is what I have reported in [Bugtracker, bug 4051, fixed] Update PostgresSQL driver

Regards,

Offline

#9 2008-06-04 12:40:42

Caro
Member
Registered: 2008-05-06
Posts: 31

Re: Java heap space, simple job!

Thanks for your answer.

In TOS 2.4 RC, I use a tPostresqlInput and I put the cursor at 100. Is it load my data by packets of 100 lines ?

Thanks,
Caro

Offline

#10 2008-06-04 14:04:38

Caro
Member
Registered: 2008-05-06
Posts: 31

Re: Java heap space, simple job!

Currently, TOS 2.4 RC doesn't use the last official driver in the postgres component ? So I can't try my simple job (with 5 000 000 lines) for the moment ?

Thanks for all your answer.

Caro

Offline

#11 2008-06-16 18:09:44

Caro
Member
Registered: 2008-05-06
Posts: 31

Re: Java heap space, simple job!

In TOS 2.3.3, I tried tJDBCInput and tPostgresqlInput to read 5 000 000 of lines and write them in a tDelimitedFile. In both cases, the job fails (outOfMemory : Java heap space). My JVM arguments were -Xms256m -Xmx2048m.

I can't try all txxxInput so I would like to know if TOS can read 5 000 000 lines in a database ?

Thanks

Caro

Offline

#12 2008-06-17 10:38:49

chris doudet
Member
Company: COREP S.A.S.
Registered: 2007-06-04
Posts: 105
Website

Re: Java heap space, simple job!

hi,
i use 2.4.0 and i try cursor (1000) on a 3 000 000 row : failed.
just a tpostgres to a tfileoutputdelimited.

Offline

#13 2008-06-17 10:45:44

Caro
Member
Registered: 2008-05-06
Posts: 31

Re: Java heap space, simple job!

thanks for your answer.
I tried the same thing, and I have the same problem. So I asked me if I am alone in this case or not ? And if I did a wrong thing in my job ? :-)
I conclude TOS in not capable to read around more than 2 500 000 lines. I think TIS can do that but I don't use TIS so... Somebody has the answer ?

thanks
Caro

Offline

#14 2008-06-17 12:42:24

chris doudet
Member
Company: COREP S.A.S.
Registered: 2007-06-04
Posts: 105
Website

Re: Java heap space, simple job!

hum,
normally the cursor is here for this kind of thing.
i think it's a BUG not a limitation,

talend team, can you confirm ?

Last edited by chris doudet (2008-06-17 12:42:41)

Offline

#15 2008-06-17 14:25:45

Caro
Member
Registered: 2008-05-06
Posts: 31

Re: Java heap space, simple job!

I think like you but if I must use a tJDBCIput, I can't read more than 2 500 000 lines, isn't it ?

Offline

#16 2008-06-17 15:43:35

mhirt
Talend team
Registered: 2006-09-19
Posts: 1633

Re: Java heap space, simple job!

Caro,

In 2.4.0, you have no more reason to use a tJDBC since the postgres jdbc driver have been updated in [Bugtracker, bug 4051, fixed] Update PostgresSQL driver
Thats why you should be able to use tPostGresInput with cursor.

I have to make some new tests on the question asked by Chris Doudet  : is the cursor really working in 2.4 with Postgres.
I come back to you.

Regards,

Offline

#17 2008-07-02 15:45:28

chris doudet
Member
Company: COREP S.A.S.
Registered: 2007-06-04
Posts: 105
Website

Re: Java heap space, simple job!

So.......
Is this cursor really work or not ?

Offline

#18 2008-07-11 10:19:47

chris doudet
Member
Company: COREP S.A.S.
Registered: 2007-06-04
Posts: 105
Website

Re: Java heap space, simple job!

up !
Still not working in 2.4.1

Last edited by chris doudet (2008-07-11 11:26:11)

Offline

#19 2008-07-25 11:29:33

chris doudet
Member
Company: COREP S.A.S.
Registered: 2007-06-04
Posts: 105
Website

Re: Java heap space, simple job!

up!
Still not working in 3.0.0M1

Offline

#20 2008-10-01 17:06:29

eguerin
Member
Registered: 1970-01-01
Posts: 42
Website

Re: Java heap space, simple job!

Hi,

I've the same problem on Talend 2.3.3 and 2.4.1.
The "cursor limit" on a tPostgreSQLInput doesn't resolve the problem for me.
I try to select 12 millions rows but the jobs die by java heap space.

Offline

#21 2008-10-20 11:07:45

chris doudet
Member
Company: COREP S.A.S.
Registered: 2007-06-04
Posts: 105
Website

Re: Java heap space, simple job!

up !
still not working in 3.0.0

Offline

#22 2008-12-04 15:07:33

etletisme
Member
Registered: 2008-03-11
Posts: 31

Re: Java heap space, simple job!

Hi everybody,

I'm working with TOS 3.0.0 and i'm experiencing the same problem : the cursor option in component tPostgresIntput seems not to work (i got a lack of memory error and changing the cursor size seems not chnaging anything)

Do you have some news about that problem ? Did the latest release (3.0.2) solve the problem ?

Best regards

Offline

#23 2008-12-08 11:39:49

chris doudet
Member
Company: COREP S.A.S.
Registered: 2007-06-04
Posts: 105
Website

Re: Java heap space, simple job!

Hi all,

It works at last.

It was resolve in 2.4.4.

i don't know for the v3. To be tested

Offline

#24 2010-03-11 17:23:38

Janick
New member
Registered: 2009-12-10
Posts: 3

Re: Java heap space, simple job!

Hi, I get that error when I run my job:

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

However, if I export that job to a .bat file, edit its contents and I remove the -Xms256M and -Xmx1024M options it runs right!

What happens if I remove those options? I'm fed up of trying several values for -Xms and -Xmx and none make it work. It just works if I remove these options.

Thank you

PS: My job is very simple! Just a tFixedFlow and a tFileOutputDelimited

Last edited by Janick (2010-03-11 17:24:30)

Offline

#25 2010-03-11 17:52:48

rdagher
Member
Company: ALDO Group
Registered: 2010-02-15
Posts: 26
Website

Re: Java heap space, simple job!

Janick,

In your case, it is not even able to initialize the JVM using the Xms parameter. Make sure you are entering the correct syntax for those parameters, and that you have enough space to be reserved for the smallest threshold. (Keep in mind that the syntax is case-sensitive).

Here is an interesting link showing six common mistakes in setting the java heap space:
http://javahowto.blogspot.com/2006/06/6 … -heap.html

Regards,
Rabih

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Java heap space, simple job!

Board footer

Powered by FluxBB