Memory Leak in my JDBC application.

Hi
I am experiencing a memory leak in a test application using the JDBC-ODBC bridge to access an MS Access DB.
I close the result set, statement and connection objects after each query. Even then the memory allocated to the process increases by about 20K after each query.
Is there anything else I should do apart from closing these objects??
Thanks a lot for your time.
Fred.

I am having the same problem using JDBC-ODBC bridge with the MS SQL server DB. Even after closing all of the objects as specified.
Sorry couldn't be of much help but check the following link
http://www.allaire.com/Handlers/index.cfm?ID=12409&Method=Full
But I do not have a work around for this may be I am not looking at the right response.
Can some one please help.

Similar Messages

  • Adobe Version 9: Memory Leak Issue causing the application to crash .

    We are facing an issue with Adobe Acrobat Reader Version 9. The application is getting crashed with an unhandled system exception (Access violation reading location 0x1003a24e).
    Our application is a .NET Windows based application, where we are using webbrowser control to view the pdf files.
    The application works fine with Adobe Version 8 and 10. But there is an issue specific to Version 9, even described in the Adobe Forum
    We tried using CoFreeUnusedLibraries Function on the form close event of the document viewer as a work around, but it didn’t help.
    The client is not willing to move to the Adobe Reader Version 10. Can anyone facing similar issue with Adobe Version 9, please assist.
    Thanks,
    Dev

    We are having the same issue. Have you found a way to fix this or to work around it?
    Thank you,
    Susan

  • Is it correct to say you can never have a memory leak in a java application

    Also, what is the reasoning/advantage behind the developer not being allowed to explicitly call the garbage collector? Seems a simple thing to allow and would it not get rid of all the timing problems caused by the unpredictability of when the GC will run?

    Not only dispose of Window but also close of Input/OutputStream,My experience is failing to close streams won't cause any leaks (for a file output stream, changes just aren't being reflected in the file).
    cancel of Timer andWhich timer? AFAIK they (swing/util) both use a Thread and there's no need to let go of any native resource.
    dispose of Graphics.Not always (eg if you override paintComponent you shouldn't dispose of your Graphics object)
    Who says it's the responibility of the programmer to "release stuff that uses native handles" and how
    do you know? I consider this a flagrant breach of the Golden Rule of GC (you let go of the object
    reference and we collect the garbage). It's a mine may will step on because information about it is
    hidden in the documentation.And how would that happen? The finalize method isn't guaranteed to be called (correct me if I'm wrong) in certain conditions, so there really is no place to put the cleanup code (except for a finally block or shutdown hook in the code that created the object). I don't think mentioning something in the documentation is the same thing as hiding information.
    If you use like SWT then it's explicitly mentioned that you're responsible so there's no one to blame.I recently read that article. I think it's good practice to follow that rule.
    When the JVM process terminates the OS can reclaim all resources it has allocated, including what the
    Java program leaked.Do you have any proof of this?

  • Memory leak on SunOne Web Server 6.1 on application reload

    Hi!
    I am pretty sure that i have found a memory management problem in
    SunOne Web Server 6.1 .
    It started with an OutOfMemory error we got under heavy load . After
    some profiling with Jprofiler i didn't find any memory leaks in the
    application.Even under heavy load (generated by myself) i can't find
    anything ,more, i can't reproduce the error! The memory usage is
    about 20Mb and does not go up .
    However it is pretty simple to see the following behavior:
    [1] Restart the server (to have a clear picture) and wait a little for
    memory usage to stabilize.
    [2] In the application dir. touch .reload or one of the classes:
    The memory usage goes up by another 50Mb (huge amount of mem. taking
    into account the fact that it used only 20Mb under any load befor).
    Do this another time and another 20Mb gone etc..
    The JProfiler marks the memory used by classes . And it can be
    clearly seen the GC can't release most of it.
    I AM sure this is not the application that takes all the memory.
    Another hint : after making the server to reload application i can see
    that the number of threads ON EVERY RELOAD is going up by ~10-20
    threads .The # of threads goes lower over time but not the mem usage.
    My system:
    Sparc Solaris 9 ,Java 1.4.2_04-b05, Sun ONE Web Server 6.1SP5
    Evgeny

    my guess is that - because of '.reload' , web container tries to
    recompile all the classes that you use within your web application and
    hence the memory growth is spiking up.What do you mean by "tries to recompile"?The classes in
    Web-inf are already compiled! And i have only ~5 jsp's .
    (the most part of the applic. is a complicated business logic)
    If you are talking about reloading them ,yes,that's the purpose of .reload,
    isn't it? :).But it seems that container uses the memory for it's own
    classes: the usage of memory for my classes don't really grow
    that much (if at all) after reload (according to profiler)
    Also the real problem is that the memory usage grows to much for
    too long (neither seen it going down) and thus ends with OutOfMemory.
    if you are seeing the memory growth to be flat in stress environment,
    then I am not sure that why do you think that there is a memory leak ?There is no memory leak in stress environment.
    There is memory leak while reloading the application.
    It is a memory hog for sure (~20-30Mb for every reload).
    Memory leak?It seems that way because i can't see memory usage go
    down and after a lot of reloads OutOfMemory is thrown.
    also, what is jvm heap that you use ? did you try jvm tune options like -
    XX:+AggressiveHeap ?256Mb.I can set it bigger ,but how do i know that it will not just delay
    the problem ?
    Thanks for response.
    Evgeny

  • Memory leak in "Tenured Generation" heap (JVM 1.5)?!

    For about over a year, I'm trying to hunt down the memory leak in our server application. But after all the improvements I've made (especially with 'forgotten' listeners that didn't exist anymore), I'm confident that the application doesn't have a memory leak anymore. At least the new "jconsole.exe" tool of JDK 1.5 shows me a very intersting behaviour:
    Even if the server app is doing nothing than one thread polling a database table for possible new jobs to process, the memory slightly increases over time ... very slightly. It's just like the screenshot at
    http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html#memory
    where you might find a very slight tendency up. I run jconsole the whole day to track the application on a computer where no jobs got processed, so the application only sit there there whole day and just one thread has a loop that polls a database table via JDBC and doesn't get a result. The result is, that the memory chart is like the chart in the screenshot of the link above just with much more jaggies. About every 20 minutes, garbage collection seems to kick in, as the jaggie line drops about several megabytes just to increase again slowly.
    Of course the thread loop creates objects but it doesn't hold any (debugged it several times and it is quite easy code). So this behaviour makes sense. But it doesn't make sense that the memory usage overall slowly increases over many hours (ultimativaly leading to an OutOfmemoryError).
    So far, I still thought, it must be a memory leak in my application. But then, I played with jConsole and noticed this: if I just display the Memory Pool "Eden Space", the jagged line always drops down to the same level, i.e. no memroy leak. The "Survivor Space" is also constant in average (no memory leak). But the "Tenured Generation" line shows this memroy leak behaviour (slowly increases). This space is described as:
    Tenured Generation (heap): pool containing objects that have existed for some time in the survivor space.
    So, I'm not so sure anymore if this memory must be in my application. Unfortunately, jConsole doesn't show some kind of object tree that can be browsed and I would see what kind of object (collection) increase.
    I tried profiling my application, but the profiled app runs so slowly that it would need many days or weeks until it's possible to identify some bad objects.
    Is there another way to identify such memory waisters?

    Write a main() that does the polling in a tight loop 1000 times. Then System.gc(); Thread.sleep(1000); System.exit(). Run the thing with -Xrunhprof. Observe the "live bytes" and "live objs" columns in the generated java.hprof.txt file. Anything that strikes as suspicious? If every polling round leaks one object, there's likely to be 1000 (or N*1000) of something live. Make sure the leak is in the polling routine by running it 1,000,000 rounds and getting an OutOfMemory.

  • Memory leak issue on Blackberry Torch 9860

    I own a Blackberry Torch 9860 Os 7.0 Bundle 1465 for the last 5 months
    Previously I had Blackberry Curve 9300 which I had upgraded to OS 6.0. It had memory leak issues wherein my application memory would gradually dropdown to merely KBs within a few days and I had to reboot it to restore the same.
    When I purchased Torch 9860, I migrated my device settings from Curve to Torch using the Desktop Manager. I face the same memory leak issues in this new device as well. I have 3 email accounts configured on my device and some social networking applications which include facebook, twitter, and some messengers. I usually delete my emails and keep only a few useful mails for reference. Still I am facing this issue wherein I have to reboot my device to restore the application memory. It starts from 152 Mb and usually dropsdown to merely Kilobytes of memory. The phone freezes for around 1-2 minutes sometimes when I am on call, or accessing my contacts.
    Also to let you know that I have a 8GB memory card on my phone which has around 1.6 GB free space. I have disabled Compression on my memory card as well.
    Please advise as I am having a hard time using this time this way.
    Regards,
    Abhinav Sharma
    Thanks and regards,
    Abhinav Sharma

    I have the almost same problem when i run the phone gap app on the 9800 torch OS 6 than this build of 1.2 MB takes the memory of 40 MB at run time and the device gives the low memory message and close the app forcefully.
    In my app phone gap is using 3-4 html pages and java script .
    And when i navigate on these pages it gives this message of memory low.
    Please help me to out of this .
    And please suggest if any professional help in this
    Thanks\\\
    Vipin Tomer

  • Memory Leak - GC scope

    Hi,
    I have a pervasive memory leak in my server application. I have used JProfiler to track it down and indeed after 10 or so hours of execution I can see clearly the Java classes which are increasing in count. For my application they are (in order of total memory size used):
    byte[]
    <class>[]
    String
    QueueLink(custom class)
    Knowing where my system leaks memory is nice, but on trawling the code I cannot really see why it really leaks and therefore am unable to fix it. One thing I do not quite get about Java is the garbage collector scope. If I have a loop, like so below:
    while (true)
    Object o = new Object();
    ...do something with 'o'
    then for every loop iteration 'o' is initialize to a new Object. But the old reference of o (from the previous iteration) is for all intents a purposes gone. BUT, does this get collected by the GC or does it only get collected when the scope leaves the while loop? If the latter then UNTIL the loop terminates I will "leak" memory, which would go part way to explaining my problem.
    Any ideas, any suggestions on how I can fix my leak(s)?
    Regards,
    NC

    ... then for every loop iteration 'o' is initializeto a
    new Object. But the old reference of o (from the
    previous iteration) is for all intents a purposes
    gone. BUT, does this get collected by the GC ordoes
    it only get collected when the scope leaves thewhile
    loop?It has nothing to do with variable scope in this
    case. The object that 'o' used to reference is no
    longer reachable (unless something else in that loop
    made another reference to it, such as adding it to a
    collection which is still reachable), so it is
    eligible for GC.The question is, will it be GCed.
    I remember hearing a few years back that the VM--or certain VMs--might not collect any eligible local variables until after the method completes, or something to that effect. If so, then an infinite while(true) { new Object(); } loop will exhaust the heap rather quickly. Even if that was true back then, I doubt it's true of Sun's VM today.

  • Possible Memory Leak in C-API

    I can start my C_API JMS application and just create a JMS context. Looking at the windows task manager I see the memory footprint slowly grow.
    I'm not a Java wizard so I haven't found the right tools set for diagnosing this.
    Thanks for any help

    Has anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?You write a library in C/C++ only which does NOT use JNI which implements the functionality you want to achieve in your java application.
    You write a wrapper for that which excercises it completely including be able to run it in a loaded state.
    Then you buy/find a C/C++ profiling tool and run it on the wrapper.
    You write you JNI code such that the ONLY thing it does is interface between java and the library above. It doesn't impleent business logic nor work flow.

  • Possible memory leak in C++ code

    Hello,
    I have a Java application that calls through JNI, functions in a C++ dll that use the GroupWise API (COM based). After the application creates a number of accounts in GroupWise the memory footprint of the java.exe process reaches ~1.5GB of RAM on a 32 bit Windows OS. After reaching this value, the C++ code no longer works, meaning that connecting to GroupWise fails. If I restart the application at this point everything starts to work until it reached ~1.5 GB again.
    I am suspecting that the problem might be caused by a memory leak. I have taken a dump of the java process with jmap and analyzed it with jhat. If I have not released an object in C++ code, would this object be visible in the dump i took of the java.exe process? The biggest consumer from what i have seen in the dump is class [B      20353-instances      33259261-bytes.
    Has anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?
    Thank you,
    Ionut Marin.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Has anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?You write a library in C/C++ only which does NOT use JNI which implements the functionality you want to achieve in your java application.
    You write a wrapper for that which excercises it completely including be able to run it in a loaded state.
    Then you buy/find a C/C++ profiling tool and run it on the wrapper.
    You write you JNI code such that the ONLY thing it does is interface between java and the library above. It doesn't impleent business logic nor work flow.

  • Database toolkit memory leaks

    I have memory leaks in my Labview application connecting and inserting data into a MSSQL server using Labview Database Toolkit.
    Versions: Labview 7.1, Toolkit 1.0.1.
    I have searched the forums and searhed everywhere else...I see there are some issues. (For example List tables vi). Removing the list tables vi helped a lot. But I can still see that I'm loosing memory here and there, now and then.
    My question is: Is there any general guidlines to prevent all memory leaks mentioned? 
    Or possibly, will it all go away if I upgrade the versions. (As I understand I have too update Labview to be able to update the Toolkit?)
    Best Regards
    /Jesper
    Solved!
    Go to Solution.

    Have you seen this Developer Zone document?
    LabVIEW Database Connectivity Toolset 1.0.1 Known Issues
    Functions, VIs, and Express VIs - ID 2F7E2352    
    Memory Leak in the Database Toolset in DB Tools Open Schema VI
    The DB Tools Open Schema VI leaks memory which if called continuously eventually causes a LabVIEW crash. This is a sub VI of the DB Tools Insert Data VI.
    Workaround—At the highest level, if you are continuously updating values in a table, make sure the table already exists and leave the Create Table input to the DB Tools Insert Data VI set to FALSE.
    Other than this, the most important thing is to close all references...
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How to configure JProfiler6 to monitor tomcat6.0 for memory leak

    Hello,
    Can anyone help. I am tring to work out the memory leak of my Web Application running on the local server. I have been told that jprofiler is a good tool for monitoring memory. I have dowloaded jprofiler6, but I dont know how to config the setting.
    what i have done is:
    1.from the Quickstart window->An application server, locally or remotely
    2.follow the wizard step by step
    1)choose application server Apache Tomcat 6.x
    2)application is located "on this computer"
    3) Chose JVM vendor
    4) wait for a connection from the JProfiler GUI
    5) Locate the start script :C:\Program Files\Apache Software Foundation\apache-tomcat-6.0.20\bin\startup.bat
    6) port:8849
    7)finished
    After i done these, a error message came out said:
    "Could not connect ot 127.0.0.1:8849.Please make sure that the remote address is correct, the remote program is started properly and the netword route allows socket connections."

    Hi,
    The recommended solution is to download Oracle JRockit Mission Control (available here: http://www.oracle.com/technology/software/products/jrockit/index.html) and install on your server. The installers include Oracle JRockit JVM as well as Mission Control, and are free of license checks.
    If that solution for some reason is unfeasible you can download legacy development license files from here (http://download2.bea.com/pub/license/All%20Products/BEA_WebLogic.zip).
    The license you are looking for is named “LIC-WLRT20.txt”. Rename it to license.bea, and follow the instructions at http://edocs.bea.com/jrockit/geninfo/diagnos/conf_run.html#wp1077371

  • Memory leaks in the app

    While doing memory leak profiling in an application, I came across leaks due to certain custom methods like readHeaderBytes or httpProtocolStart from CFNetwork, GSEventRunModal from GraphicsServices etc. What should I do to correct these memory leaks???

    Find the objects that you are allocating that aren't being freed and call release on them. Check out this link:
    http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt. html

  • JBoss... Memory leak

    Hi All,
    We are observing memory leak while running our application on JBoss 4.0.2. We attached the profiling tool - JProfiler to trace the memory leak and we found that the class[] (Proxy classes) is increasing drastically which is not getting garbage collected.
    The "HeapWalker" shows that EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run() has allocated some memory which is not being freed.
    The application uses MDBs extensively and the JMS server is configured to NullPersistance. We are closing all the Queue connection, session and sender properly.
    What could be the possible cause for this leak?
    Thanks in advance,
    Nirav.

    Nirav...
    I am new to jboss. Our application has a memory leak on the similar issue. some UIL2 threads keep openning another copy of themselves about every minute. An example of such thread follows on the bottom of my message.
    My question is this: Where do i change the connection factory type to "java:/ConnectionFactory"? I searched all of my jboss config files for "RMIConnection" and did not fing any references.
    If you can offer any advice, it would be really appreciated.
    thanks
    julia
    Name: UIL2(SocketManager.MsgPool@f34a08 client=192.168.30.237:8093)#1
    State: TIMED_WAITING on EDU.oswego.cs.dl.util.concurrent.LinkedNode@eaabad
    Total blocked: 0 Total waited: 2
    Stack trace:
    java.lang.Object.wait(Native Method)
    EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:353)
    EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:723)
    EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:747)
    java.lang.Thread.run(Thread.java:619)

  • Applet calling javascript function causing memory leak

    Hi,
    I'm troubleshooting one memory leak issue in my application and to do that I created one simple Java applet and HTML + javascript function to locate the problem.
    Basically it's an applet calling a javascript function using a timer. The javascript function simply does nothing.
    I tested in IE 8.0 and JRE 1.6.0_23-b05 and memory of IE keeps increasing.
    I saw this bug http://bugs.sun.com/view_bug.do?bug_id=6857340 which seems related with my issue, but if I understand correctly from the page, the issue should have been fixed.
    I posted this message to find out if others also find same issue and if there's a solution for this. If I comment out window.call("dummy", null); , memory will not climb up.
    Java code
    +public class Main extends Applet implements Runnable  {+
    public Applet currentApplet= this ;
    +     public JSObject window = null;+
    +public void run(){+
    +          System.out.println("run..");+
    +     }+
    +public void start(){+
    window = JSObject.getWindow(this);
    int delay = 300; //milliseconds
    +ActionListener taskPerformer = new ActionListener() {+
    +public void actionPerformed(ActionEvent evt) {+
    window.call("dummy", null);
    +}+
    +};+
    new Timer(delay, taskPerformer).start();
    +     }+
    +public static void main(String[] args) {+
    +          System.out.println("start...");+
    +          Main main = new Main();+
    +     main.start();+
    +     }+
    +}+
    Javascript source code
    +<html>+
    +<head>+
    +<script>+
    +function dummy() {+
    +     +
    +}+
    +</script>+
    +</head>+
    +<body>+
    +<applet .... >+
    +...+
    +</html>+

    Try this url:
    http://www.inquiry.com/techtips/java_pro/10MinuteSolutions/callingJavaScript.asp
    It also provides some examples.

  • Cropping Crashes Aperture 3 due to Video Card Memory Leak?

    Recently after updating from 3.1.1 to 3.1.2 I have been experiencing crashing issues whenever I perform the cropping action.  I see the death of wheel following hitting the return key.  There was one time when the master version itself vaporized into thin air.  I also noticed from the iStat Menus that the issue only occurs when the ATI Radeon HD 2400 memory usage has reach its full capcity.  I quite firefox to release some of the memory then Aperture functions normally until the memory runs out again.  I would then see the death of wheel once again when I crop.
    Is Aperture crashing because I need a more powerful video card or is it a memory leak issue with the application?
    Thanks!
    iMac (Early 2008)
    2.4 GHz Intel Core  Duo
    4 GB 800 MHz DDR2 SDRAM
    ATI Radeon HD 2400

    Frank Caggiano wrote:
    Lets see if we understand this correctly.
    You had a system on which Aperture was crashing when you used the crop tool. You then got a brand new system and the crop tool still causes  Aperture to crash. Am I correct so far?
    What are the common factors between the old and new systems as far as Aperture goes? Not knowing how you migrated from the old to the new the only  thing we can say for certain is that the library is identical.
    So have you run the basic library first aid steps? Another thing to try is to create a new empty library, put an image into it and try cropping it and see what happens.
    Let us know what happens after those steps,
    regards
    Frank Caggiano wrote: Lets see if we understand this correctly. You had a system on which Aperture was crashing when you used the crop tool. You then got a brand new system and the crop tool still causes  Aperture to crash. Am I correct so far? What are the common factors between the old and new systems as far as Aperture goes? Not knowing how you migrated from the old to the new the only  thing we can say for certain is that the library is identical. So have you run the basic library first aid steps? Another thing to try is to create a new empty library, put an image into it and try cropping it and see what happens. Let us know what happens after those steps, regards
    I migrated everything from the old computer to the new.  I also tried creating a new library and the issue persists.  I've also tried the First Aid options all of 'Repair Permission, Repair Database, and Rebuild Database' none of which worked.  I've also tried reinstalling Aperture and it crashes on the first crop.
    I will need to be editing many photos in a few weeks and now I'm stuck with this issue.. HELP!!!!!!!
    It seems like others have run into the same issue also but no solutions!!
    Why is aperture 3.1 crashing after cropping images, any one else?
    http://www.google.com.hk/url?sa=t&source=web&cd=1&ved=0CBsQFjAA&url=https%3A%2F% 2Fdiscussions.apple.com%2Fthread%2F2642858%3Fstart%3D15%26tstart%3D0&ei=axUETrC0 DM3ciAL23ZXZDQ&usg=AFQjCNE9Kv1N--m8mCyaRkyWi3E9d-0aXg&sig2=qzgEONrK7vLfWetcPT69y A

Maybe you are looking for

  • How do I fix Hard drive errors on my macbook pro?

    I ran the etrecheck software on my Macbook Pro and it produced the following results. It says there are 15 errors with the hard drive and I was wondering how I can figure out what they are and possibly find a solution to get rid of them. I have used

  • Dreamweaver cs5 problems and adobe support close the case on you

    I emailed Adobe support with the message below and they closed the case on me and told me to go over to the developers connection website and open a case there. Well of course there is no where to open a case there, it brings you back to the normal s

  • /SAPAPO/OM_ORDKEY_ORDMAP_CHECK

    Hi, I am watching the two Live Cache table /SAPAPO/ORDKEY and /SAPAPO/ORDMAP grow steadily. SAP recommends to execute from time-to-time the report /SAPAPO/OM_ORDKEY_ORDMAP_CHECK to resolve any inconsistencies between the tables and downsize the conte

  • Learning blending modes

    I've learned most of what I know about PSE from a certain magazine from England.  But in their step by step instructions, you are told to use this or that blending mode, but not why. Are there any threads on here that expalin what the different modes

  • 6120 Classic Bluetooth Dongle Not Working

    Any ideas guys my bluetooth dongle which works fine with my 6230i will not connect on my 6120 classin its fine with usb cable but not my dongle Bob