MVS - Cobol-Java Out of Memory Issue

S

SK

hi,

We are trying to run a batch Cobol program which calls a Java code
which is on the USS in mainframe. When we tried running the job using a
few input hundred records everything goes fine, but when we tried
running the same code with around a few thousand records (around 5000)
the JVM ran out of memory problems after processing 1200 records.

The GC message generated at run time suggests that each time the amount
of memory being released is lesser and gradually there's no space to be
freed and the code runs out of memory. We found a memory leak with the
NewStringPlatform JNI call used in Cobol to convert a Cobol string to a
Java string. IBM has already identified this issue and have come up
with a fix.

But even without the using the NewStringPlatform JNI call, the code
runs out of memory in the manner as mentioned earlier. I had tried to
find some kind of information related to this but in vain. If someone
here has come across a similar situation or has overcome this problem
succesfully, please let me know the details.

Thanks,
SK
 
H

Helmut Leininger

SK said:
hi,

We are trying to run a batch Cobol program which calls a Java code
which is on the USS in mainframe. When we tried running the job using a
few input hundred records everything goes fine, but when we tried
running the same code with around a few thousand records (around 5000)
the JVM ran out of memory problems after processing 1200 records.

The GC message generated at run time suggests that each time the amount
of memory being released is lesser and gradually there's no space to be
freed and the code runs out of memory. We found a memory leak with the
NewStringPlatform JNI call used in Cobol to convert a Cobol string to a
Java string. IBM has already identified this issue and have come up
with a fix.

But even without the using the NewStringPlatform JNI call, the code
runs out of memory in the manner as mentioned earlier. I had tried to
find some kind of information related to this but in vain. If someone
here has come across a similar situation or has overcome this problem
succesfully, please let me know the details.

Thanks,
SK
Hi,

I once had a similar problem. I did access a database viy JDBC and
forgot to close the Statement and so the ResultSet could not be freed
--> OutOfMemory Exception after 6000 to 8000 records, depending on
available memory.

Regards
Helmut
 
H

Helmut Leininger

SK said:
hi,

We are trying to run a batch Cobol program which calls a Java code
which is on the USS in mainframe. When we tried running the job using a
few input hundred records everything goes fine, but when we tried
running the same code with around a few thousand records (around 5000)
the JVM ran out of memory problems after processing 1200 records.

The GC message generated at run time suggests that each time the amount
of memory being released is lesser and gradually there's no space to be
freed and the code runs out of memory. We found a memory leak with the
NewStringPlatform JNI call used in Cobol to convert a Cobol string to a
Java string. IBM has already identified this issue and have come up
with a fix.

But even without the using the NewStringPlatform JNI call, the code
runs out of memory in the manner as mentioned earlier. I had tried to
find some kind of information related to this but in vain. If someone
here has come across a similar situation or has overcome this problem
succesfully, please let me know the details.

Thanks,
SK
Did you already try to run it with the Java profiler? It could give a
hint where to earch.

Regards
 
S

SK

Helmut,

Thanks for the response! We don't have a profiler installed to check
any memory leaks. Do you recommend any profiler that would be available
for immediate installation? I tried finding Jinsight but looks like its
no longer available.

Regards,
SK
 
J

jan V

Thanks for the response! We don't have a profiler installed to check
any memory leaks. Do you recommend any profiler that would be available
for immediate installation? I tried finding Jinsight but looks like its
no longer available.

I recall a JavaWorld article which compared a bunch of Java profilers...
www.javaworld.com ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top