OnDemand User Group

Support Forums => OD/WEK & JAVA API => Topic started by: LVLO on May 16, 2017, 12:08:47 AM

Title: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: LVLO on May 16, 2017, 12:08:47 AM
Hi,

In our system, all files are on CMOD in AFP format. When a client need a file we transform the AFP part of file on a pdf file to the client.

This process is do  50000 times a day, and during all day we see native memory of the aix server with the web service and odwek api grow. If we do nothing, the system crash with a core dump.

We have to restart the JVM to free the native memory. The same process without afp files (with pdf files en cmod) run normally without memory leak.

Some ideas ?

During the web service we end the return of pdf file with a logoff and a terminate.

Thanks to all.

Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: Justin Derrick on May 16, 2017, 06:12:19 AM
Which versions of CMOD / ODWEK / Operating System / Java are you using?  Which platform are you on?

What have you tried to resolve the error?

-JD.
Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: LVLO on May 16, 2017, 08:11:44 AM
Thanks for your interest, below the versions of products

CMOD 9.0.0.3
ODWEK 9.0.0.3
AFP2PDF 3.0.3u
AIX 6.1 TL9
WebSphere 8.5.5.8
Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: LVLO on May 16, 2017, 08:13:45 AM
And Java 1.6
Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: Ed_Arnold on May 16, 2017, 11:14:11 AM
Hello LVLO -

9.0.0.3 is a little old:

http://www-01.ibm.com/support/docview.wss?uid=swg21260192 (http://www-01.ibm.com/support/docview.wss?uid=swg21260192)

It came out in December 2013 which is quite a while ago in today's fast-paced environment.

On my 9.0.0.8 system if I execute "./afp2pdf ?"   I get

Version: 303e-CM

Even Java 1.6 is on the back end of Java releases.

Any chance of getting more current?

Ed

Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: LVLO on May 17, 2017, 01:30:41 AM
We have to do the job with this version until 2018, and now we have to restart 6 JVM every day before the memory leack crash the machine.

When you restart the jvm the native memory is free.
Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: Ed_Arnold on May 18, 2017, 10:31:15 AM
Quote
Some ideas ?

Quote
We have to do the job with this version

1. Stay on the same version but get current on service for that version.

2. Might be a memory leak in the application code.

Ed

Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: LVLO on May 19, 2017, 01:08:26 AM
I do a core dump of the memory and i see 100 774 times the same sequence :

5B 5B 5B 5B 00 00 00 00 00 00 00 00 00 00 01 D8 00 5B 00 40 00 5F 00 46 00 49 00 58 00 45 00 44 00 5F 00 40 00 5D 00 0A 00 45 00 58 00 54 00 45 00 4E 00 53 00 49 00 4F 00 4E 00 3D 00 0A 00 52 00 45 00 43 00 44 00 45 00 4C 00 49 00 4D 00 3D 00 30 00 41 00 0A 00 4C 00 52 00 45 00 43 00 4C 00 3D 00 31 00 33 00 33 00 0A 00 50 00 52 00 54 00 5F 00 4C 00 4E 00 43 00 54 00 3D 00 30 00 0A 00 4C 00 4E 00 43 00 54 00 3D 00 30 00 0A 00 43 00 44 00 50 00 47 00 3D 00 35 00 30 00 30 00 0A 00 50 00 4C 00 45 00 4E 00 47 00 54 00 48 00 3D 00 30 00 2E 00 30 00 30 00 0A 00 50 00 57 00 49 00 44 00 54 00 48 00 3D 00 30 00 2E 00 30 00 30 00 0A 00 4F 00 52 00 49 00 45 00 4E 00 54 00 3D 00 30 00 0A 00 43 00 43 00 3D 00 41 00 4E 00 53 00 49 00 0A 00 50 00 52 00 3D 00 4E 00 4F 00 4E 00 45 00 0A 00 52 00 45 00 43 00 46 00 4D 00 3D 00 56 00 0A 00 54 00 52 00 43 00 3D 00 30 00 0A 00 50 00 41 00 47 00 45 00 53 00 3D 00 41 00 4C 00 4C 00 0A 00 55 00 53 00 45 00 50 00 52 00 45 00 56 00 49 00 45 00 57 00 45 00 58 00 49 00 54 00 3D 00 30 00 0A 00 50 00 52 00 45 00 56 00 49 00 45 00 57 00 5F 00 45 00 58 00 49 00 54 00 5F 00 50 00 41 00 52 00 4D 00 53 00 3D 00 0A 00 41 00 46 00 50 00 32 00 4C 00 49 00 4E 00 45 00 5F 00 43 00 4D 00 44 00 3D 00 0A 00 53 00 52 00 56 00 52 00 5F 00 50 00 53 00 46 00 3D 00 0A 00 50 00 52 00 54 00 4F 00 50 00 54 00 3D 00 0A 00 52 00 45 00 53 00 4F 00 55 00 52 00 43 00 45 00 5F 00 43 00 4F 00 4D 00 50 00 41 00 52 00 45 00 3D 00 35 00 30 00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: Ed_Arnold on May 23, 2017, 11:06:21 AM
What you pasted in your previous append.  Are there any eyecatchers in there?  Can you view that as text?

Ed
Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: LVLO on July 03, 2017, 07:10:13 AM
We will try to use :
Properties props = new Properties();
props.put(ODConfig.RESOURCE_CACE_DIR, "/tmp/Cache"); //Location for ODWEK ResCache
props.put(ODConfig.RES_CACHE_MAX, 200); // Max FileSystem usage in MB

And we hope this leave memory from caching ressources from files. If you have experience with this parameters you are welcome to comment.
Title: Re: Odwek - Afp2Pdf - AFP Files - Memory leack
Post by: Andreas Baaserud Hauge on February 23, 2023, 02:05:12 PM
Hi,

I am curious if you solved your memory leak issue and how you did it?
We are also in the same situation right now, we have an web application which serves web services which handles the afp2pdf.

I have used plenty of tools to monitor the JVM of our application, it seems to stay no more than 2-4GB.
The Java prosess will increase to endless of memory untill it crash because of out of memory on server.

Our system: