About Memory Leak in JAVA Any body pls help me

Hi All,
In our application, with JAVA we are using c, c++ native methods also.
The problem is, Eventhough the application is in idle state, the Virtual Memory occupation is getting increased. For 24 hours, 30 MB is increased, while the application is in idle state.
Is there any possiblity, this much memory leak can happen in JAVA. or it is from Native c side..
I would appreciate anybody' s help.

Thanks
I am using JProfiler for that. I can observe what kind of objects not getting freed and the size of memory it is taking. and i observed thro JProfiler, that is only 16 kb of memory leak is happening. Can Any body who is well known about JProfiler help me. Can i differentiate the memory leak from JAVA and Native C side using JProfiler.
Any help would be appreciated.

Similar Messages

  • Any body pls help me

    I need a sample blue print for BI, i tried broesing ,all the known sites but in despair.Any way anybody hvaing pls fwd me i'm very badly in need of the sample.
    i'm quite new.
    your help will be very much regarded and point's will be awarded
    Tahnks a lot in advance.
    Waiting for.................

    Hi Kittu,
    I hope these links will help you...
    http://help.sap.com/bp_biv170/documentation/SolutionScope_EN.doc
    http://help.sap.com/bp_biv235/BI_EN/html/Business_Blueprint.htm
    http://help.sap.com/bp_biv335/BI_EN/documentation/SolutionScope_EN.doc
    what does business blue-print consist?
    http://help.sap.com/bp_biv235/bi_en/html/BWspecific_Info.htm
    http://help.sap.com/bp_biv235/bi_en/documentation/Multi-dimensional_modeling_EN.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2b50ac90-0201-0010-d597-8d833833f9e0
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/828d9590-0201-0010-95a7-ea8cf8814b94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1b439590-0201-0010-ea8e-cba686f21f06
    http://www.sap.com/services/servsuptech/bestpractices/index.epx --- look for blueprint
    <b>BW case studies</b>
    http://help.sap.com/bp_biv135/index.htm
    http://service.sap.com/bi .
    If you are interested in CRM
    SAP BW Scenario: CRM Opportunities Analysis
    http://help.sap.com/bp_biv135/documentation/BW/I36_BPP_EN_DE.doc
    Check this out...
    http://help.sap.com/bp_biv170/html/Business_Blueprint.htm
    Regards, ABY

  • Memory Leaks in Java

    Hi,
    I have a considerably large business application that consists of JSPs and JavaBeans which connects to a database. The application runs off a Tomcat server. Some information about the application is as follows:
    a. JDK version 1.4.2_11
    b. Database used is MS SQL Server 2000 with Server pack 4
    c. Running on Tomcat version 4.1.31. Tomcat is being run under services.
    d. Third party libraries -
         Cryptix32
         i-Net Crystal Clear
         CeWolf and JFreeChart
         iText
         jxl
    I noticed that the Tomcat memory utilization increases after a period of using the application.
    I recently purchased JProbe as it was recommended as a good tool to check for memory leaks in Java applications. Having purchased Jprobe, the team is now proceeding to investigate the cause of the problem.
    I would like very much to seek the expertise of the community here as to some technique / steps the team should take during the course of the investigation.
    We are currently following the following steps:
    a. Startup JProbe
    b. Set a JProbe J2EE memory session which points to Tomcat and JDK
    c. Run the JProbe session
    d. Do a Collect Stack Trace
    e. Login to our application, execute a "single function" and then logout
    f. Do an Include Heapdump in Snapshot
    g. Save the snapshot
    h. Stop the JProbe session
    i. Investigate the output
    j. Repeat (c) to (i) for other functions in our application
    Would appreciate if the community here could advice if we are proceeding with the investigation correctly and whether we are missing out on any memory leaks. All suggestions are most welcome.
    Thanks.

    Hi,
    Just a bit more information about the application:
    Application contains:
    - 4490 JSP files
    - 1492 Java Classes
    Application Server:
    - Tomcat 4.1.31
    - JDK 1.4.2_11
    Database:
    - Microsoft SQL Server JDBC 2000
    - Microsoft SQL Server 2000 SP4
    Other JAR files:
    - Cryptix 32
    - jxl
    - CeWolf
    - i-Net Crystal Clear
    All items mentioned above is running on a Server with Microsoft Windows Server 2003 with 2GB of RAM.
    The JSP communicates to the JavaBean which in turn will connect to the Database via JDBC. We are not using connection pooling at the moment.
    The SQL Server takes around 1GB of ram and I have configured Tomcat with an Initial 250MB and a maximum of 750MB of RAM. Tomcat is running under NT services.
    Tomcat memory slowly increases and it takes around 4-7 weeks before it reaches the maximum memory and we get the out of memory error.
    We have done checking for memory leaks using JProbe but have not found any leaks in our program yet. We did find some of our classes were not closing the connection. I am not sure whether this could be the cause of the memory leak. We have also checked for static members in our classes and have not found anything wrong with them.
    Can anyone tell me whether:
    a) Is 2GB RAM sufficient for this type of configuration?
    b) If we add more RAM will it be more beneficial?
    c) Our Tomcat web.xml configuration. Reloadable = true, Development = true. Will this cause memory leaks?
    d) Should we upgrade to Tomcat 5 or 6?
    e) Should we upgrade the JDBC Driver to 2005?
    f) Should we upgrade the version of JDK to 1.5 or 1.6?
    g) Is it recommended to restart Tomcat every now and then?
    Thanks.

  • Possible causes for memory leak in Java and Tomcat

    I would like to enquire what are the typical mistakes done by programmers that will cause memory leak in Java and Tomcat.

    Please refer the below site. It will give more points about the memory leak and how to rectify it.
    http://www.experts-exchange.com/Software/Server_Software/Application_Servers/Q_20981562.html?cid=336

  • Memory Leak in  Java

    Anyone can suggest what is the best way to test memory leak in JAVA?
    Thanks in advance for the help.

    I'll try to define it for the OP
    Define: memory leakhttp://en.wikipedia.org/wiki/Memory_leak
    Define: bestDoesn't really apply but wondered what wikipedia would return: http://en.wikipedia.org/wiki/Best
    Define: testhttp://en.wikipedia.org/wiki/Software_testing

  • HT4061 I can not connect to ITunes Store to download updates. I have no trouble connecting to the internet. It worked OK up to about a last month. can any body help.

    I can not connect to ITunes Store to download updates. I have no trouble connecting to the internet. It worked OK up to about a last month. can any body help.

    Hi there bigyellowdigger!
    I have an article here that can help you troubleshoot this issue with your connection to the iTunes Store. That article can be found right here:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • HT204350 hi all i porches apple macbook air model mc-234 serial number W80031NH9A7 but it dont save the cahrge i dont know the reason is here any body to help me please i thing there will not be battery inside but im not sure about it

    hi all i porches apple macbook air model mc-234 serial number W80031NH9A7 but it dont save the cahrge i dont know the reason is here any body to help me please i thing there will not be battery inside but im not sure about it

    Being a 2009 model, it is likely the battery is worn out. Take it to a service center and have the battery replaced.

  • I need Expert Decomposition of classes in Source Code for my reaserch purpose. Any body can help me in this regard?

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=698286&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I need Expert Decomposition of classes in Source Code of Firefox for my research purpose. Any body can help me in this regard?
    == This happened
    ==
    Not sure how often
    == Firefox version
    ==
    3.0.19
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19
    == Plugins installed
    ==
    *-Default Plug-in
    *RealPlayer(tm) LiveConnect-Enabled Plug-In
    *6.0.12.1662
    *Office Plugin for Netscape Navigator
    *Google Update
    *Shockwave Flash 10.1 r53
    *Yahoo Application State Plugin version 1.0.0.7
    *Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers
    *Adobe PDF Plug-In For Firefox and Netscape
    *DRM Netscape Network Object
    *Npdsplay dll
    *DRM Store Netscape Plugin

    Please let me tell you that I Expert Decomposition may be of any Version of Firefox or Thunder Bird.

  • I have problom to running maps.when i put any direction route a massage popup. Direction could not be found between these location. I am ussing ios 6. Any body plz help me

    I have problom to running maps.when i put any direction route a massage popup. Direction could not be found between these location. I am ussing ios 6. Any body plz help me

    Read here, as such is not supported everywhere:
    http://www.apple.com/ios/feature-availability/

  • TS2634 I have a very weak wifi signal, any body can help?

    I have a verry week wifi signal, any body can help?

    I have a verry week wifi signal, any body can help?

  • How to root out memory leak with  Java JNI & Native BDB 11g ?

    We are testing a web application using the 32-bit compiled native 11g version of BDB (with replication) under 32-bit IBM 1.5 JVM via JNI under 64-bit RedHat Linux. We are experiencing what appears to be a memory leak without a commensurate increase in Java heap size. Basically the process size continues to grow until the max 32-process size is reached (4Gb) and eventually stops running (no core). Java heap is set to 2Gb min/max. GCs are nominal, so the leak appears to be native and outside Java bytecode.
    We need to determine whether there is a memory leak in BDB, or the IBM JVM or simply a mis-use of BDB in the Java code. What tools/instrumentation/db statistic should be used to help get to root cause? Do you recommend using System Tap (with some particular text command script)? What DB stats should we capture to get to the bottom of this memory leak? What troubleshooting steps can you recommend?
    Thanks ahead of time.
    JE.
    Edited by: 787930 on Aug 12, 2010 5:42 PM

    That's troublesome... DB itself doesn't have stats that track VM in any useful way. I am not familiar with SystemTap but a quick look at it seems to imply that it's better for kernel monitoring than user space. It's pretty hard to get DB to leak significant amounts of memory. The reason is that it mostly uses shared memory carved from the environment. Also if you are neglecting to close or delete some object DB generally complains about it somewhere.
    I don't see how pmap would help if it's a heap leak but maybe I'm missing something.
    One way to rule DB out is to replace its internal memory allocation functions with your own that are instrumented to track how much VM has been allocated (and freed). This is very easy to do using the interfaces:
    db_env_set_func_malloc()
    db_env_set_func_free()
    These are global to your process and your functions will be used where DB would otherwise call malloc() and free(). How you get usage information out of the system is an exercise left to the reader :-) If it turns out DB is the culprit then there is more thinking to do to isolate the problem.
    Other ideas that can provide information if not actual smoking guns:
    -- accelerate reproduction of the problem by allocating nearly all of the VM to the JVM and the DB cache (or otherwise limit the allowable VM in your process)
    -- change the VM allocated to the JVM in various ways
    Regards,
    George

  • Memory Leak in Java Server

    Howdy Folks- I wrote a server monitor in java, which I was expecting to run for months at a time without restarting. Apparently there is some slow memory leak which results in an OutOfMemoryError after a few weeks. It's in a production system, so I can't readily add debug statements to the code, and the OutOfMemoryError apparently screwed up the logging, so I didn't get a stack trace in my logs, just an "OutOfMemoryError" went to standard out.
    I'm assuming the problem lies in the code, specifically probably some discarded reference that is not being properly garbage collected? I am using a few different ArrayLists to store some historical information, and I call clear() on these frequently. Is there any known issue with ArrayList or HashMap that the "clear()" method doesn't result in garbage collection of the objects that were in it? I am also doing a "remove(int)" sometimes as well. Any chance the objects cleared or removed would not be garbage collected?
    thanks
    Bleu

    Howdy Folks- I wrote a server monitor in java, which I
    was expecting to run for months at a time without
    restarting. Apparently there is some slow memory leak
    which results in an OutOfMemoryError after a few
    weeks. It's in a production system, so I can't
    readily add debug statements to the code, and the
    OutOfMemoryError apparently screwed up the logging, so
    I didn't get a stack trace in my logs, just an
    "OutOfMemoryError" went to standard out.Are you even attempting to catch Errors? Catching Exceptions will not help with this. It should print the stack trace. When it OOMs it doesn't mess up what's already allocated, it just can't allocate more.
    I'm assuming the problem lies in the code,
    specifically probably some discarded reference that is
    not being properly garbage collected? Most likely, there are references that are never being cleared in your code. Without seeing the code or at least having a better description, I don't think anyone here can help you. Can you set up a test senario and use an Optimizer to see what's going on?
    I am using a
    few different ArrayLists to store some historical
    information, and I call clear() on these frequently.
    Is there any known issue with ArrayList or HashMap
    that the "clear()" method doesn't result in garbage
    collection of the objects that were in it? Not that I know of, no. I doubt that is the problem.

  • What is memory leak in Java context?

    I am looking for a precise definition here...

    If you are looking for HOW a memory leak can show up in java, here are a few examples:
    A stack implemented on an array can have a memory leak if the object's position in the array isn't set to null after the object is popped off the stack (I think I first saw that in "effective java", by joshua bloch, if you want to look more into that).
    Another way: interning strings to the jvm can cause a memory leak, because once a string is interned, it is stuck there forever, even if all other references to the string are gone, and the string will never again be used.
    Furthermore, any flyweight concept that doesn't have a strategy for pruning away unused object (objects with 0 external remaining references) will be a memory leak of a sort.
    Hash maps are another place you can run into this problem. They may hold the only reference to both objects of a pair, and hence, since the key exists nowhere else, the pair is basically useless, but the map does prevent them from being garbage collected.
    What's the common link? The all have to do with some data structure or another maintaining obsolete references to objects. Since objects can't go out of scope if they are stored in a data structure that doesn't go out of scope, they cannot be garbage collected.
    - Adam

  • Huge memory leak in java jvm after update 2 for Snow leopard

    Since I updated to Java Update 2 for Snow Leopard my JVM suddenly grows massive (10GB+ real memory - -Xmx=3500m) consuming all memory and rendering my iMac unusable. This does not happen predictably but does happen several times a day now requiring I power off and on again.
    I had been living happily with update 1 with no such problem.
    I need to either go back to update 1 (should have it on Time Machine) or find a solution for this problem.

    Our application is a j2ee-based commercial application facing to specified customers, having about 120 access request an hour.
    We ' re doing stress test on the test server. The strange memory leak occurs at 1:20 am this morning while we're out of company , and no job was scheduled to run at that time. So I have the tendency to image that there is something inside oc4j had occured.
    I have used OptimizeIt to monitor the heap status. However , as the memory leak problem occurs very occasionally ,and that tool deadly slows our server, we are currently using no profiling tools.

  • Finding memory leaks in java

    Hello,
    I have a memory leak in my application. I have found other memory leaks in the software using JProfiler, but I have a problem with JProfiler finding this one. My biggest problem is the JProfiler itself. If I use short runs, the JProfiler works fine. If I run my application for more than half a day, the JProfiler eats up memory and after a while it stops responding.
    I tried JProbe, but after profiling my application for 18 hours straight, it got buggy and wouldn't work correctly. It also ate up alot of memory, and couldn't process my snapshot after 18 hours of run. I saved all snapshots, and restarted JProbe. The initial snapshot was read correctly, but the final snapshot threw an NegativeArraySizeException.
    So, now I am looking for other tools which are able to find memory leaks without hanging or crashing after running 24 hours. Any recommendations?

    I dont know any other profiler you can use, but how about using the divide and conquer approach?
    Disable a significant section of your application and let it run for a day. If the leak occurs, its in the non disabled part.
    If it doesn't, its in the disabled part. Next, enable all the code. Then disable about half of the half that failed and try that. Continue doing so until
    you isolate the code enough that you can look at it and hopefully find the problem. Note you will need to keep track of what you previously enabled and disabled as a test (I put comments in the code).
    Alternately, you can look at functions that perform complex functionality that you suspect might be the problem and have the function return
    dummy data rather than perform the functionality. If the leak goes away, its that function(s).
    Example:
    public String getComplexData(String arg1, String arg2){
    //this section bypasses the complex code and returns dummy data
    boolean x1= true;
    if(x1==true)
    return new String("some dummy data");
    //complex functionality goes here.
    Also of help would be to list everything that can cause a memory leak (I assume its a memory leak and not a resource leak such as not closing connections).
    Here are some ideas:
    1) persistant class variables that are a collection that have objects added to them but never deleted and allowed to be garbage collected
    such as static class variables, session scope variables, or application scope variables.
    2) An object tree where one of its nodes is never set to null to be garbage collected (such as a static class variable).
    If you are running a web application in a clustered enviornment, try running it on only one server.

Maybe you are looking for

  • Is anyone using testing seeing compiler lock-ups? [SOLVED]

    As the title says, is anyone using testing seeing compiler lock-ups? I've been seeing them for about two or three days. Sometimes the system will hang for a few seconds at "Starting make" with 100% CPU usage, then will continue normally. Other times

  • How to modify a xml file?

    I use JAXP 1.1 to read a xml file as a DOM tree. I can make change to the DOM tree in the memory, such as add an element or change the node value, but how can I apply these changes to the source xml file, i.e., write the changes back to the disk?

  • Add fields ple give ur solutions

    Hi i have some fields in 2lis_03_bf remaing fields i didnt find. 8 fields i diidnt find in 2lis_03_bf i need to add 8 fields,  its available in 3 tables, in 2 tables comp code is common field (bkpf and bseg) in mbew i didnt find any primary key to li

  • Adobe Reader 8.1.2 Quits on Admin Account OK on Guest Account Leopard

    I have a new Aluminum Imac that when opening Adobe reader 8.1.2 on the admin account it quits unexpectedly. When I log into the guest account it opens no problem. I have tried removing some adobe.plist files and at least got to an opening screen befo

  • Dreamweaver/MAMP Upgrade on Mac (Lion)

    This is a pretty broad question(s). I've been working on a MacBook Pro running on Leopard for 6 1/2 years. I used Dreamweaver and MAMP but very seldom upgraded them. I've finally upgraded to a new MacBook Pro running Lion and want to get up to speed