Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to debug an XMLType memory leak?

scome98Jul 28 2008 — edited Jul 31 2008
We are currently developing an application that relies heavily on XML and XDB. It is a custom messaging system processing large number of relatively small XML messages ( 2Kb-16Kb). The system is 10% Java and 90% PL/SQL. The Java code is used to wait on an AQ queue for messages (using XMLType as ADT) through a PL/SQL stored proc. When a message is received, the Java code gets the XMLType object and passes it to another PL/SQL proc to process the message. We are now seeing the PGA session memory grow after each message is processed. The overall database performance is suffering quite a bit after about 12 hours (PGA of these sessions grows to 700Mb each).

We are using the same concept for two other similar components with no issue. While we use the PL/SQL proc to dequeue and enqueue messages, no other processing is going on. We are thus assuming that the Java portion of our code is OK and it seems that the memory leak is in the PLSQL portion.

What tools or debug utility can we use to trace and debug a memory leak in PL/SQL?
We are suspecting XMLType because nothing else in our code seem to hold data for a long time. We ran TkProf to make sure none of our SQL statements were the cause of the slowdown. SQL execution is looking good. Looking at the PGA memory, here are a couple of snapshot showing the growth:

NAME SID CLIENT_INFO VALUE MEM_PCT TIME
-------------------------------- ---------- ------------ ---------------- ---------- ------------------------
session pga memory 638 MPP:10:1:CJI 13,113,128 7 28-JUL 09:39:17
session pga memory 638 MPP:10:1:CJI 21,305,128 11 28-JUL 10:23:35

Any advice in how to debug memory leaks in this case would be appreciated.

Thanks,

~Stephane
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 28 2008
Added on Jul 28 2008
6 comments
1,766 views