Imapd service "Leak  Memory"

I already have Java Communications Suite 6 Working , but, I have a Leak Memory problems with imapd process.
I have the server with 30 imapd process, 30 mshttpd process, and 30 pop process running to balance the load of the users.
All work fine(the CPU is 100% idle, the RAM is 80% available=6GB) when I access via browser(Chrome,Firefox), too when I access it with the traditional clients IMAP (Outlook, ThunderBird,etc).
The problem is that if one user want to copy(not just view) locally all your emails to your laptops/pc, the imapd process eat more than 3GB(instead of 80MB) of RAM and the system is getting slower.
If the user cancel this process(copy via IMAP all your emails) the process dont freedom doesn't release the memory and the system getting slower.
Actually my solution is:
# kill -9 <PID_imapd>
Some times when I kill the process the problem going to other imapd process, so in this case the solution is:
/opt/sun/comms/messaging/sbin/stop-msg
/opt/sun/comms/messaging/sbin/start-msg
I think that this problem is a bug but I dont know what is the patch.
May you help me? Any idea?
My system is:
A X2100 with one socket AMD Opteron 2600Mhz, 8GB RAM, 2 x disks 750GB in mirror with Solaris Volume Manager, Soalris 10 HW 10/08.
Thanks.
Jaime

Jorth, maybe we are not well explained,
the normal operation of imapd process(one process) need no more that 200MB, when a user is linked to it.
Check my example:
================================================================================================================
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
874 root 610M 421M sleep 59 0 0:14:51 0.1% java/160
818 webservd 413M 285M sleep 59 0 0:16:43 0.3% webservd/95
607 root 326M 45M sleep 59 0 0:07:01 0.1% webservd/58
16719 mailsrv 283M 50M sleep 59 0 0:00:06 0.0% imapd/5
798 root 237M 37M sleep 59 0 0:04:04 0.1% ns-slapd/48
*16673 mailsrv 220M 97M sleep 59 0 0:00:06 0.0% imapd/6*
*16677 mailsrv 210M 42M sleep 59 0 0:00:05 0.0% imapd/5*
*16696 mailsrv 205M 36M sleep 59 0 0:00:04 0.0% imapd/5*
*16695 mailsrv 200M 38M sleep 59 0 0:00:04 0.0% imapd/6*
*16685 mailsrv 197M 38M sleep 59 0 0:00:08 0.0% imapd/5*
*16682 mailsrv 195M 40M sleep 59 0 0:00:04 0.0% imapd/5*
*16681 mailsrv 193M 46M sleep 59 0 0:00:04 0.0% imapd/5*
*16690 mailsrv 187M 52M sleep 59 0 0:00:03 0.1% imapd/6*
*16687 mailsrv 187M 40M sleep 59 0 0:00:05 0.0% imapd/5*
*902 icsuser 185M 24M sleep 59 0 0:00:05 0.0% cshttpd/2*
NPROC USERNAME SWAP RSS MEMORY TIME CPU
78 mailsrv 2439M 2329M 28% 0:11:53 0.5%
14 icsuser 1064M 233M 2.8% 0:06:55 0.0%
136 root 965M 727M 8.9% 2:15:20 50%
1 webservd 264M 326M 4.0% 0:16:43 0.3%
1 noaccess 90M 100M 1.2% 0:01:13 0.0%
Total: 237 processes, 1042 lwps, load averages: 1.91, 1.90, 1.89
================================================================================================================
When we run an aplication like OutLook to copy locally to the laptopn all the mail via IMAP, "ONE imapd process" eat more memory that need it and never released.
Example:
================================================================================================================
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
*16673 mailsrv 2856M 2534M sleep 59 0 0:00:06 45% imapd/6* <---------------this process eat memory and slow the system(CPU/RAM)
874 root 610M 421M sleep 59 0 0:14:51 0.1% java/160
818 webservd 413M 285M sleep 59 0 0:16:43 0.3% webservd/95
607 root 326M 45M sleep 59 0 0:07:01 0.1% webservd/58
16719 mailsrv 283M 50M sleep 59 0 0:00:06 0.0% imapd/5
798 root 237M 37M sleep 59 0 0:04:04 0.1% ns-slapd/48
*16677 mailsrv 210M 42M sleep 59 0 0:00:05 0.0% imapd/5*
*16696 mailsrv 205M 36M sleep 59 0 0:00:04 0.0% imapd/5*
*16695 mailsrv 200M 38M sleep 59 0 0:00:04 0.0% imapd/6*
*16685 mailsrv 197M 38M sleep 59 0 0:00:08 0.0% imapd/5*
*16682 mailsrv 195M 40M sleep 59 0 0:00:04 0.0% imapd/5*
*16681 mailsrv 193M 46M sleep 59 0 0:00:04 0.0% imapd/5*
*16690 mailsrv 187M 52M sleep 59 0 0:00:03 0.1% imapd/6*
*16687 mailsrv 187M 40M sleep 59 0 0:00:05 0.0% imapd/5*
*902 icsuser 185M 24M sleep 59 0 0:00:05 0.0% cshttpd/2*
NPROC USERNAME SWAP RSS MEMORY TIME CPU
78 mailsrv 2439M 2329M 80% 0:00:5 0.5%
78 mailsrv 2439M 2329M 10% 0:11:53 0.5%
14 icsuser 1064M 233M 2.8% 0:06:55 0.0%
136 root 965M 727M 8.9% 2:15:20 50%
1 webservd 264M 326M 4.0% 0:16:43 0.3%
Total: 237 processes, 1042 lwps, load averages: 1.91, 1.90, 1.89
===================================================================================================
The rest of the imapd process(29) in this moment just load 40-50MB(when those are free).
If we kill the process 16673 the user connect to the next imapd process and the problem persist whit the same patology: eat memory and CPU, and slow the system.
So, we think that is not normal and maybe we need patch the system to solve the problem.
We will to test the 64Bit version in this moment and we will post the results.
Thank
Jaime

Similar Messages

  • On Windows 2012,WMIPRVSE.EXE WMI service leaks memory

    Hello all,
    In my Windows 2012 9700 server,I have installed LSI provider and I am running associator queries to LSI Provider which further interacts with WMI service which acts as a CIM Object Manager(CIMOM).When I run these queries,I am seeing huge memory
    usage increase in the WMIPRVSE.EXE service.
    I was browsing through some of the articles and came to know this is a known issue.But Microsoft has not applied this issue to Windows 2012 server.Below are my findings,
    Maximum memory usage by the particular host:536870912 Bytes.After which it would crash and a new wmiprvse.exe would come up.I did not change this memory limit because it's not the procedure to resolve this issue.
    Can anyone who has already experienced this issue,could guide me?
    Thanks in advance.
    Regards,
    Ravi

    Hi,
    Thanks for posting.
    Firstly, I recommend you to use Network Monitor to check the source of the high CPU in WMIprvse.exe:
    Using Netmon to figure out the source of high CPU in WMIprvse.exe
    In addition, maybe you can enable WMI logging to find more detailed information:
    WMI Debug Logging
    Best regards,
    Susie

  • On Windows 2012,WMIPRVSE.EXE WMI service leaks memory when registering SMO to SQL Server events

    Hi, 
    I have written an application which registers to events using SMO API. 
    I have noticed that after some time, suddenly event flow from SQL Server stops. and I can't event shut down my application properly, as StopEvents() method of SMO hangs the shutdown.
    After further investigation, I have found out that a spawned process (probably by SQL Server) WMIPRVSE.EXE memory grows rapidly. 
    As soon as this process reaches about 482MB ~ 500MB memory consumption. I didn't notice any particular CPU peak for this process. 
    As I manually kill this process, I'm able to shutdown my application properly and even re-register it to events.
    I may add that this issue doesn't happen on an regularly updated Windows 2008. 
    I managed to find this hotfix (the only one for 2012) but it won't install!!! http://support2.microsoft.com/kb/2790831/en-us?lc=1033
    In an act of frustration , I decided to bypass your process, and write a heuristic mechanism to find WMIPRVSE.EXE which is related to my application, and kill it whenever it reaches the mentioned sizes. 
    But it's not the answer. 
    Please provide a proper hotfix for 2012, as you did with Windows 2008, or an answer regarding what is wrong?
    simple search reveals that this process was very problematic in 2008...
    Regards,
    Adi

    Hi Adi,
    à
    I managed to find this hotfix (the only one for 2012) but it won't install!!! http://support2.microsoft.com/kb/2790831/en-us?lc=1033
    Would you please let me know detailed edition information of this server 2012? Was it Windows Server 2012 Standard
    or
    Essentials or any other?
    Based on your description, I understand that
    KB2790831 can’t be installed in that problematic Windows Server 2012. Would you please let me know the error message that you can get when failed to install the Hotfix? Please perform a
    clean boot and check if still can’t install this Hotfix.
    Meanwhile, please check if
    KB2934016 was installed on your Windows Server 2012? If didn’t install, please install this update rollup and check if this issue still exists.
    If any update, please feel free to let me know.
    Hope this helps.
    Best regards,
    Justin Gu

  • What does it mean "Business Service leak: Web Engine State Properties"

    Hi ,
    We are on the Siebel 8.0.0.2 with extra patches to address the memory Issues. we are experiencing memory Leak, When I increase the logging level to 5 and couple of other parameter enabled, I see statements like "Business Service leak: Web Engine State Properties" ( even for Custom Business Service as well). Also when I enable Trace Statements, I don't see Release statements for the ALLOCS associated with Business Services. I am wondering to know if you have experienced something of this sort? Any thoughts will be greatly appreciated.
    Thanks,
    GS
    Edited by: user4496185 on Jan 20, 2009 12:03 PM

    Agree with everyone's suggestions here. We recently went through a process of reviewing all of our eScript and found a number of occurrences of objects created and never destroyed.
    We applied a standard approach of declaring object type variables at the beginning of each script then destroying them all with a finally() block at the end (oObject=null).
    Initialising objects if and when they are required, instead of all up front at the beginning of a script, may also serve to reduce the impact of this problem. So instead of:
    var oCustBS = TheApplication().GetService("Custom BS");
    if (bIsRecord) {
         oCustBS.InvokeMethod("CustMethod");
    oCustBS = null;
    ...use:
    var oCustBS;
    if (bIsRecord) {
         oCustBS = TheApplication().GetService("Custom BS");
         oCustBS.InvokeMethod("CustMethod");
    oCustBS=null;
    ...There is an Expert Services Review which can be conducted that will identify problems, though it's relatively straight forward to do so yourself with enough time and effort.

  • GetOracleDecimal seems to leak memory?

    Hello, I am using the C# statement below to retrieve a decimal value from an OracleDataReader, adjust the precision, then assign it to a .NET decimal type:
    decimal volume = (decimal)OracleDecimal.SetPrecision(reader.GetOracleDecimal(5), 28);
    Over time, the service that hosts this method leaks memory. After some investigation, I found that "Oracle.DataAccess.Types.OpoDecCtx" types were collecting in the finalize queue. Any ideas on how to resolve this? I can't explicitly Dispose() an OracleDecimal...
    I'm using ODP.NET version 2.102.2.20.
    Thanks

    Thanks for the reply. I am using .NET 2.0 SP2. I upgraded the ODP.NET client to 2.111.7.20 but am still seeing leakage of the OracleDecimal structs.
    Here's a snippet of output from WinDbg:
    Ready for finalization 32874 objects (0b4de540->0b4fe6e8)
    Statistics:
    MT Count TotalSize Class Name
    00fb8cec 32816 656320 Oracle.DataAccess.Types.OpoDecCtx
    With each pass of the service the Count and TotalSize grow in increments equal to the number of rows I'm querying...
    Just for laughs I changed the GetOracleDecimal statement to GetDecimal and the memory issue went away (because I'm no longer creating OracleDecimals). But I need to use the higher precision type to prevent overflows..
    Thanks again..

  • Leak memory in xerces DomParser

    Hey,
    I have " leak memory " in my Java application (Stand alone).
    I suspect that this leak caused by xerces DomParser.
    i reached to this conculsion after using in Jprobe as a memory debuger.
    Does any one has a similar problem?
    Thank you.
    code:
    DOMParser parser = new DOMParser();
    parser.parse(new InputSource(new FileInputStream(schemaFile)));

    Hey, which Version of Xerces do you use?

  • Why does Firefox 4 (4.0.1 specifically) leak memory?

    '''Answer:''' I figured it out.
    History lesson first. Ever since the 4.0.1 update, Firefox 4 has been crashing A LOT. It's gotten so bad that FF4.0.1 will eat memory with no end in sight and eventually Windows (Win 7 64-bit) forcefully close the program due to an out of memory error.
    I have 8 GB of RAM installed. And, it would crash once it exceeds 1.5 GB of RAM used by Firefox 4. I've seen Firefox 4 go up to 1.85 GB of RAM in Task Manager. This is with 20 tabs open.
    With the add-on Leak-Monitor, I've narrowed down the issue. Having only Leak-Monitor as the extension installed, all pop-ups point to how '''poorly Firefox 4 handles Javascript'''!
    MSNBC Leak Monitor issue:
    [http://www.octoberasian.com/tech/text/FF4-Leak-Monitor_MSNBC.txt Leak Monitor log from MSNBC.com]
    I've gotten more pop-ups from even support.mozilla.com because of the Javascript on this website.
    Firefox 4.0.1 is leaking memory from every Javascript on every website I load. It's leaking memory as we speak with only this page loaded (one tab).
    FIX IT! Firefox 4 is poorly handling Javascript, especially when multiple tabs are opened.

    octoberasian: I, too, am experiencing this phenomenon. I shut my system down, pulled the EIC cable, held down the power button - then replugged and rebooted. I closed down every unneeded application that I have set to auto-start. Finally, I opened a single Firefox 4.0.1 window and let it sit. It began with consuming 43 Mb of memory. By afternoon - about 5 hours later - it was up to 203 Mb. There is definitely something very wrong with this version. It does the same on all the machines we have, sans our server. We don't use the server for anything but being a server & it has some version of Firefox 3 on it anyway. No Java Scripts were running, nor were any Adobe ARM or any plugins. I noticed when plugins run - the memory leakage goes into overdrive. Hey, I'm just sayin'...

  • Skype 6.4 continues to leak memory at an astonishing rate? Hard crashes ALL my Macs

    Last version of Skype 6.3 leaked memory like a river full of rapids. And once it gobbled up 1.5gigs or so of memory, it HARD crashed my iMac requiring a hard reboot. It only takes about 30 minutes for skype to do this. My iMac (2012 Core i7 3.4ghz 32 gigs RAM) is at Mac OSX 10.7.5 and it is repeatable every time. I have to set timers to remind me to restart Skype every 30 minutes.
    We thought 6.4 would fix the issue but no luck doing exact same thing. My colleague is across the country on an iMac with 10.7.5 same issues. Repeatable on my Macbook Pro running 10.8. If he let's it run, he gets the black screen of death and have to hard restart. Just like me.
    This issue has been around for several weeks and is making skype unusuable for us and we rely on it heavily. Note we are PAYING customers. to Skype.
    This ONLY happens if we use the video feature. Submitted to Skype, wondering if anyone else having issue?

    Last version of Skype 6.3 leaked memory like a river full of rapids. And once it gobbled up 1.5gigs or so of memory, it HARD crashed my iMac requiring a hard reboot. It only takes about 30 minutes for skype to do this. My iMac (2012 Core i7 3.4ghz 32 gigs RAM) is at Mac OSX 10.7.5 and it is repeatable every time. I have to set timers to remind me to restart Skype every 30 minutes.
    We thought 6.4 would fix the issue but no luck doing exact same thing. My colleague is across the country on an iMac with 10.7.5 same issues. Repeatable on my Macbook Pro running 10.8. If he let's it run, he gets the black screen of death and have to hard restart. Just like me.
    This issue has been around for several weeks and is making skype unusuable for us and we rely on it heavily. Note we are PAYING customers. to Skype.
    This ONLY happens if we use the video feature. Submitted to Skype, wondering if anyone else having issue?

  • DS 5.1sp2 SLAPI plugins leak memory

    I am running DS 5.1sp2, on Solaris 9/SPARC, and have been encountering problems with the ns-slapd process leaking memory when using SLAPI plugins.
    We have written our own bind pre-operation plugin function which, when enabled, causes ns-slapd to leak memory at a pretty rapid rate. I have a simple test where I perform a simple ldapsearch in an endless loop. The ns-slapd process starts off with a VSS of ~617MB (we have a fair amount of cache enabled) ; after a few minutes of my test, the VSS grows by several MB. With the plugin disabled, I can run the same test for hours with no growth in the VSS of ns-slapd.
    I have also performed this test with my plugin disabled, and the "testbind" plugin function (the one provided in <server root></server>/plugins/slapd/slapi/examples/testbind.c) enabled. I see even more rapid memory leakage than with my plugin.
    Are there known issues with SLAPI memory management? Is there anything I can do other than restarting ns-slapd on a regular basis (in production, this memory leak causes VSS growth of several hundred MB in the course of a few days).

    I think if you want to modify the result before it is returned, your plugin needs to be invoked post-op as well. Your plugin can be both at the same time, just make sure your init function knows what to do when called a second time.
    Moreover, without looking at the stack trace, it is hard to make any progress. Do you still have the core file? Can you paste the pstack and pflags output ?
    # Run "file" on the core to see if its a 32 or 64 bit core
    # cd /path/to/ns-slapd
    # pstack <corefile>
    # pflags corefile
    Alternatively, see if you can reproduce the problem with a small plugin. Smaller the better. I'll give it a go.

  • Does ReportDocument leak memory?

    <p class="ssiBODYCOPY">Using CrystalDecisions.CrystalReports.Engine.ReportDocument XI R2.<br /><br />w3wp.exe memory use raises while a report is generated (which is expected), yet it does not seem to be ever released after. If you keep generating same report again and again, IIS eventually runs out of memory.<br />A report does not call any external DLLs or COM objects.<br />Calling repDoc.Dispose() does not seem to help.<br /><br />Please help.<br /></p>

    Methods:
    Dispose()
    GC.WaitForPendingFinalizers()
    GC.Collect()
    Details:
    I created a C# application that connects to BOXI.
    It does not specifically use the ReportDocument object, but was also encountering serious memory issues.
    I was also using the Dipose method to mark objects for garbage collection.
    .Net garbage collection happens automatically (at some time or another), but you can force it using GC.Collect(). I tried this, but was still leaking memory.
    Until I found GC.WaitForPendingFinalizers(), which causes the garbage collector to wait until all disposed objects have completely finished their destructors. I think this made the difference with BOXI objects, because they are nested.
    After I was using all three methods, I had no more memory issues. I realize this information may be out of date, but I posted it for future seekers.

  • Flash is killing Safari, which is leaking memory ...

    I just saw in Activity Monitor that the Flash plugin is using 147% of the CPU, with one Flash movie playing in one of 12 open Tabs
    And Safari seems to leak memory as well, after a day or two it easily can use up to 3GB(!) of RAM.
    I am now quitting Safari routinely every 2 to 3 hours to get the CPU usage down and free RAM for other stuff, but I don't think this method makes for a great user experience.

    Hi,
    Use ClickToFlash... that way you have control of Flash content.
    http://clicktoflash.com/
    Carolyn

  • Simple JSP leaks memory?

    Simple HelloWorld.jsp leaks memory significantly. Tested with SoapUI setup with 40 clients driving load. At around invocation 100,000 the WLS server simply leaks enough memory to hit the upper heap size and dies. I'm running V10.3.2 (latest) in Production mode with the JRocket JVM. I also tried the same test with HelloWorld.HTML file and found no memory leaks, it runs HTML test fine up to 1,000,000 invocations with no memory or thread leaks.
    This test can not be any simpler.
    Also, performance goes down significantly as memory leaks! I go from 500tps down to 100tps just prior to running out of memory.
    The JSP file is extremely simple, here's the code:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Hello World JSP</title>
    </head>
    <body>
    <p>Hello World!</p>
    </body>
    </html>
    Why would such a simple JSP file cause the WebContainer to leak memory? I'm at a loss here.
    Edited by: user9200447 on Feb 26, 2010 10:47 AM

    It depends on the test being run. One possibility is it may be due to implicit session objects.
    Try using session=false otherwise session objects are created implicitly for this jsp. Dependng on sesson timeout, hits and java heap memory size you can run out of memory
    HTH

  • How to avoid the case of leaks memory in Object Oriented Programming

    Hi, Everyone, I am writing a simple web-baed application for JSP and Servlet, I pass all data from JSP to Servlet, It is due to the number of row of record are variable, so I should write a Java Instance class to stored to specific data in a Java Object, and then stored those object in a arraylist In the Servlet class, and then pass the arraylist in to a session, to pass the session from the servlet to another JSP......
    But some thing I am worried about is that if the no of row of record user input is large, then the number of object stored in the arraylist will also large. I am worried it will serious leaks memoary in my server. Because my server always occurs "Out Of Memoary Exception" in Tomcat, So If I use the above method. I affarid the memory will be further leaking in my server. So What can I do? Is it having any better method to prevent memory leaking when using Object Oriented Programming(Except using Hibernate)?
    Can Anyone be help me?
    Thank you very much for All, THX

    Because many people say that the large amount of
    using Object will lead to "memory leak", I am worried
    about the size of object I use is too large and then
    it will construct "memory leak". No it will not! You get a 'memory leak' by holding references to objects you no longer require.
    >
    The detail of my case is that:
    In my web application, there is a session variable
    pass through from one servlet to another jsp/servlet.You should only place small amounts of data in the session. If you need forward from a Servlet to a JSP (or JSP to Servlet) then you should place the data object in the request (using the setAttribute() method), not in the session. In this way, when the session is re-claimed so will be the data object.
    And this session variable is stored a Instance Object
    (which is a class write by me) with the following
    issue:
    1) This instance object having "has-a relationship"
    with another four instance object (all are the
    classes write by me)
    2) This instance object having "has relationship"
    with a arraylist, this arraylist is stored about 4-5
    instance object(all are the classes write by me) .
    If this object having the above issue, Will this
    object construct a "leaks memory" when this object
    stored in the session and pass through servlet to
    another jsp/servlet?
    Message was edited by:
    sabre150

  • SystemUIServer leaks memory, possibly related to spotlight

    SystemUIServer leaks memory. Immediately after reboot it occupies about 8 to 9 MB (real) on my system. Climbing to more than 17MB after only 30 minutes. After 3 days, 20 hours of uptime total real memory consumption of the SystemUIServer process was 441MB. Upon researching the process I found this forum devoted to Spotlight and interaction with SystemUIServer. Testing, I found Spotlight was unresponsive, the tool would not pull down and it didn't respond to the keboard shortcut.
    Killing SystemUIServer brings the process memory usage back down but it continues to climb as it runs. Spotlight became responsive.
    System is fully patched and updated.
    I also noticed after rebooting from update that iSync logs messages like the following in console.log:
    2007-08-09 05:54:54.180 SyncServer[3857] A Sync Server is already running on this computer, exiting process.

    I guess my question would be, does anyone know when Apple is going to fix either Spotlight or SystemUIServer so it doesn't leak/crash as seems to so common here in the discussion groups?
    Probably need a bit more troubleshooting...
    My uptime is now 3days 20 hours -odd coincidence.
    SystemUIServer is using 10.96MB Real Mem.
    So, I don't know if I would expect Apple to already believe that there is a problem needing to be fixed. Really, don't think anything in this forum can be considered "common." For a core function of the OS, the Spotlight forum is now one of the quietest of all the Tiger forums- only one that sees less action is UniversalAccess.
    Anyway, I'm not sure why you're having a problem with memory leaks in SystemUIServer or with Spotlight, and I'm not enough of a developer to tell you how you could debug it. All I can say is that your situation is not the norm and that there is likely something specific to your situation that is causing it. The unresponsiveness of Spotlight may very well be a side effect of the memory leak which is being caused by something else on the menubar.

  • Marshelling Web Service Response Memory Leak

    I believe I have found a memory leak when using the configuration below.
    The memory leak occurs when calling a web service. When the web service function is marshelling the response of the function call, an "500 Internal Server Error ... java.lang.OutOfMemoryError" is returned from OC4J. This error may be seen via the TCP Packet Monitor in JDeveloper.
    Unfortunately no exception dump is outputted to the OC4J log.
    Configuration:
    Windows 2000 with 1 gig ram
    JDeveloper 9.0.5.2 with JAX/RPC extension installed
    OC4J 10.0.3
    Sun JVM version 1.4.2_03-b02
    To demonstrate the error I created a simple web service and client. See below the client and web service function that demonstrates it.
    The web service is made up of a single function called "queryTestOutput".
    It returns an object of class "TestOutputQueryResult" which contains an int and an array.
    The function call accepts a one int input parameter which is used to vary the size of array in the returned object.
    For small int (less than 100). Web service function returns successfully.
    For larger int and depending on the size of memory configuration when OC4J is launched,
    the OutOfMemoryError is returned.
    The package "ws_issue.service" contains the web service.
    I used the Generate JAX-RPC proxy to build the client (found in package "ws_issue.client"). Package "types" was
    also created by Generate JAX-RPC proxy.
    To test the web service call execute the class runClient. Vary the int "atestValue" until error is returned.
    I have tried this with all three encodings: RPC/Encoded, RPC/Literal, Document/Literal. They have the
    same issue.
    The OutOfMemory Error is raised fairly consistently using the java settings -Xms386m -Xmx386m for OC4J when 750 is specified for the input parameter.
    I also noticed that when 600 is specified, the client seems to hang. According to the TCP Packet Monitor,
    the response is returned. But, the client seems unable to unmarshal the message.
    ** file runClient.java
    // -- this client is using Document/Literal
    package ws_issue.client;
    public class runClient
    public runClient()
    * @param args
    * Test out the web service
    * Play with the atestValue variable to until exception
    public static void main(String[] args)
    //runClient runClient = new runClient();
    long startTime;
    int atestValue = 1;
    atestValue = 2;
    //atestValue = 105; // last one to work with default memory settings in oc4j
    //atestValue = 106; // out of memory error as seen in TCP Packet Monitor
    // fails with default memory settings in oc4j
    //atestValue = 600; // hangs client (TCP Packet Monitor shows response)
    // when oc4j memory sessions are -Xms386m -Xmx386m
    atestValue = 750; // out of memory error as seen in TCP Packet Monitor
    // when oc4j memory sessions are -Xms386m -Xmx386m
    try
    startTime = System.currentTimeMillis();
    Ws_issueInterface ws = (Ws_issueInterface) (new Ws_issue_Impl().getWs_issueInterfacePort());
    System.out.println("Time to obtain port: " + (System.currentTimeMillis() - startTime) );
    // call the web service function
    startTime = System.currentTimeMillis();
    types.QueryTestOutputResponse qr = ws.queryTestOutput(new types.QueryTestOutput(atestValue));
    System.out.println("Time to call queryTestOutput: " + (System.currentTimeMillis() - startTime) );
    startTime = System.currentTimeMillis();
    types.TestOutputQueryResult r = qr.getResult();
    System.out.println("Time to call getresult: " + (System.currentTimeMillis() - startTime) );
    System.out.println("records returned: " + r.getRecordsReturned());
    for (int i = 0; i<atestValue; i++)
    types.TestOutput t = r.getTestOutputResults();
    System.out.println(t.getTestGroup() + ", " + t.getUnitNumber());
    catch (Exception e)
    e.printStackTrace();
    ** file wsmain.java
    package ws_issue.service;
    import java.rmi.RemoteException;
    import javax.xml.rpc.ServiceException;
    import javax.xml.rpc.server.ServiceLifecycle;
    public class wsmain implements ServiceLifecycle, ws_issueInterface
    public wsmain()
    public void init (Object p0) throws ServiceException
    public void destroy ()
    System.out.println("inside ws destroy");
    * create an element of the array with some hardcoded values
    private TestOutput createTestOutput(int cnt)
    TestOutput t = new TestOutput();
    t.setComments("here are some comments");
    t.setConfigRevisionNo("1");
    t.setItemNumber("123123123");
    t.setItemRevision("arev" + cnt);
    t.setTestGroup(cnt);
    t.setTestedItemNumber("123123123");
    t.setTestedItemRevision("arev" + cnt);
    t.setTestResult("testResult");
    t.setSoftwareVersion("version");
    t.setTestConditions("conditions");
    t.setStageName("world's a stage");
    t.setTestMode("Test");
    t.setTestName("test name");
    t.setUnitNumber("UnitNumber"+cnt);
    return t;
    * Web service function that is called
    * Create recCnt number of "records" to be returned
    public TestOutputQueryResult queryTestOutput (int recCnt) throws java.rmi.RemoteException
    System.out.println("Inside web service function queryTestOutput");
    TestOutputQueryResult r = new TestOutputQueryResult();
    TestOutput TOArray[] = new TestOutput[recCnt];
    for (int i = 0; i< recCnt; i++)
    TOArray = createTestOutput(i);
    r.setRecordsReturned(recCnt);
    r.setTestOutputResults(TOArray);
    System.out.println("End of web service function call");
    return r;
    * @param args
    public static void main(String[] args)
    wsmain wsmain = new wsmain();
    int aval = 5;
    try
    TestOutputQueryResult r = wsmain.queryTestOutput(aval);
    for (int i = 0; i<aval; i++)
    TestOutput t = r.getTestOutputResults();
    System.out.println(t.getTestGroup() + ", " + t.getUnitNumber());
    catch (Exception e)
    e.printStackTrace();
    ** file ws_issueInterface.java
    package ws_issue.service;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface ws_issueInterface extends java.rmi.Remote
    public TestOutputQueryResult queryTestOutput (int recCnt) throws java.rmi.RemoteException;
    ** file TestOutputQueryResult.java
    package ws_issue.service;
    public class TestOutputQueryResult
    private long recordsReturned;
    private TestOutput[] testOutputResults;
    public TestOutputQueryResult()
    public long getRecordsReturned()
    return recordsReturned;
    public void setRecordsReturned(long recordsReturned)
    this.recordsReturned = recordsReturned;
    public TestOutput[] getTestOutputResults()
    return testOutputResults;
    public void setTestOutputResults(TestOutput[] testOutputResults)
    this.testOutputResults = testOutputResults;
    ** file TestOutput.java
    package ws_issue.service;
    public class TestOutput
    private String itemNumber;
    private String itemRevision;
    private String configRevisionNo;
    private String testName;
    private String testConditions;
    private String stageName;
    private String testedItemNumber;
    private String testedItemRevision;
    private String unitNumber;
    private String testStation;
    private String testResult;
    private String softwareVersion;
    private String operatorID;
    private String testDate; // to be datetime
    private String comments;
    private int testGroup;
    private String testMode;
    public TestOutput()
    public String getComments()
    return comments;
    public void setComments(String comments)
    this.comments = comments;
    public String getConfigRevisionNo()
    return configRevisionNo;
    public void setConfigRevisionNo(String configRevisionNo)
    this.configRevisionNo = configRevisionNo;
    public String getItemNumber()
    return itemNumber;
    public void setItemNumber(String itemNumber)
    this.itemNumber = itemNumber;
    public String getItemRevision()
    return itemRevision;
    public void setItemRevision(String itemRevision)
    this.itemRevision = itemRevision;
    public String getOperatorID()
    return operatorID;
    public void setOperatorID(String operatorID)
    this.operatorID = operatorID;
    public String getSoftwareVersion()
    return softwareVersion;
    public void setSoftwareVersion(String softwareVersion)
    this.softwareVersion = softwareVersion;
    public String getStageName()
    return stageName;
    public void setStageName(String stageName)
    this.stageName = stageName;
    public String getTestConditions()
    return testConditions;
    public void setTestConditions(String testConditions)
    this.testConditions = testConditions;
    public String getTestDate()
    return testDate;
    public void setTestDate(String testDate)
    this.testDate = testDate;
    public String getTestName()
    return testName;
    public void setTestName(String testName)
    this.testName = testName;
    public String getTestResult()
    return testResult;
    public void setTestResult(String testResult)
    this.testResult = testResult;
    public String getTestStation()
    return testStation;
    public void setTestStation(String testStation)
    this.testStation = testStation;
    public String getTestedItemNumber()
    return testedItemNumber;
    public void setTestedItemNumber(String testedItemNumber)
    this.testedItemNumber = testedItemNumber;
    public String getTestedItemRevision()
    return testedItemRevision;
    public void setTestedItemRevision(String testedItemRevision)
    this.testedItemRevision = testedItemRevision;
    public String getUnitNumber()
    return unitNumber;
    public void setUnitNumber(String unitNumber)
    this.unitNumber = unitNumber;
    public int getTestGroup()
    return testGroup;
    public void setTestGroup(int testGroup)
    this.testGroup = testGroup;
    public String getTestMode()
    return testMode;
    public void setTestMode(String testMode)
    this.testMode = testMode;

    Many thanks for your help.  This solved the issue for our .NET code, however the leak is still present in the report designer.  I was also wondering if you could help further: because of the limits on the java memory process is there a way to ensure that a separate java process is started for each report that is loaded in my report viewers collection?  Essentially the desktop application that i have created uses a tab control to display each type report, so each tab goes through the following code when displaying a report and closing a tab:
    Is there a way to ensure that a different Java process is kicked off each time that I display a different report?  My current code in c# always uses the same Java process so the memory ramps up.  The code to load the report and then dispose of the report through closing the tab (and now the Java process) looks like this:
        private void LoadCrystalReport(string FullReportName)
          ReportDocument reportDoc = new ReportDocument();
          reportDoc.Load(FullReportName, OpenReportMethod.OpenReportByTempCopy);
          this.crystalReportViewer1.ReportSource = reportDoc;
        private void DisposeCrystalReportObject()
          if (crystalReportViewer1.ReportSource != null)
            ReportDocument report = (ReportDocument)crystalReportViewer1.ReportSource;
            foreach (Table table in report.Database.Tables)
              table.Dispose();
            report.Database.Dispose();
            report.Close();
            report.Dispose();
            GC.Collect();
    Thanks

Maybe you are looking for