out-of-memory

How can I see what is in my heap in Java?

I've managed to get a memory 'leak' in a java application I'm developing. When running my JUnit test suite I randomly get out of memory exceptions (java.lang.OutOfMemoryError). What tools can I use to examine the heap of my java application to see what's using up all my heap so that I can work out what's keeping references to objects wh...

Why am I getting an Out Of Memory Exception in my C# application?

My memory is 4G physical, but why I got out of memory exception even if I create just 1.5G memory object. Any ideas why? (I saw at the same time, in the performance tab of task manager the memory is not full occupied, and I could also type here -- so memory is not actually low, so I think I hit some other memory limitations)? using Syst...

expat parser: memory consumption

Hi, I am using expat parser to parse an XML file of around 15 GB . The problem is it throws an "Out of Memory" error and the program aborts . I want to know has any body faced a similar issue with the expat parser or is it a known bug and has been rectified in later versions ? ...

Is there a way to increase virtual memory in an application started from NetBeans?

In my project I often encounter Java heap space errors, i.e., there isn't enough space to run the program any more. Is there any way I can increase virtual memory? I am not using the command-line. I am using Net Beans. ...

Ocaml "Out of memory" exception; verbose mode says "Stack overflow in structural comparison"

A very huge ocaml program from an alien source needs to be fixed. One of the problem is that the program crashes at seemingly innocent line: Hashtbl.mem loc_to_no loc with "Out of memory" exception. The thing is that there's surely enough memory out there and this line is executed just fine for other inputs and even earlier during t...

Optimal / best pratice to maintain continuos connection between Python and Postgresql using Psycopg2

Hi, I'm writing an application in Python with Postgresql 8.3 which runs on several machines on a local network. All machines 1) fetch huge amount of data from the database server ( lets say database gets 100 different queries from a machine with in 2 seconds time) and there are about 10 or 11 machines doing that. 2) After processing ...

Is it possible to monitor jboss if it happens to run out of memory?

Sometimes when I redeploy war too many times, jboss gives java.lang.OutOfMemoryError: PermGen space error, is it possible to monitor jboss with other Java program that is not run inside jboss, to make sure it has not run ot of memory and if it is, then automatically restart jboss? ...

Best practices for storing and using data frames too large for memory?

I'm working with a large data frame, and have run up against RAM limits. At this point, I probably need to work with a serialized version on the disk. There are a few packages to support out-of-memory operations, but I'm not sure which one will suit my needs. I'd prefer to keep everything in data frames, so the ff package looks encouragi...

How to simulate the Out Of memory : Requested array size exceeds VM limit

I used the Out Of Memory help from sun's site. Where it is quoted as Out Of Memory : Requested array size exceeds VM limit This indicates that the application attempted to allocate an array that is larger than the heap size. For example, if an application tries to allocate an array of 512MB but the maximum heap size is 256MB, then this...

The system is out of resources when building Apache FOP

Hi, When I'm trying to build Apache FOP by ant on the command line, it complains: [javac] The system is out of resources. [javac] Consult the following stack trace for details. [javac] java.lang.OutOfMemoryError: Java heap space [javac] at com.sun.tools.javac.zip.ZipFileIndex.readBytes(ZipFileIndex.java:557) [javac] at com...

What is the best way to prevent out of memory (OOM) freezes on Linux?

Is there a way to make the OOM killer work and prevent Linux from freezing? I've been running Java and C# applications, where any memory allocated is usually used, and (if I'm understanding them right) overcommits are causing the machine to freeze. Right now, as a temporary solution, I added, vm.overcommit_memory = 2 vm.overcommit_ratio...

Can I rearrange dll images in my .NET app's address space to make more contiguous free space available?

This image shows fragmentation in my app's address space. Is there any way to force the (third-party) dll images (purple) together to eliminate (or mitigate) the fragmentation? This app will run on 32-bit XP; obviously when we eventually move to 64-bit Windows 7, this problem will go away. Thanks! ...

Java out of memory exception thrown when initializing the combo boxes

This is my code here the variable bq is a custom class called BasicQuery it returns a JavaDB connection... AutoCompleteDecorator is the class from swingX library used to implement the autocomplete functions... This code when rus about 3 times run properly but after that it keep getting frozen and after a while throws the out of memory ex...

Getting Out Of Memory: Java heap space, but while viewing heap space it max uses 50 MB

Hi! I'm using ASANT to run a xml file which points to a NARS.jar file. (i do not have the project file of the NARS.jar) I'm getting "java.lang.OutOfMemoryError: Java heap space. I used VisualVM to look at the heap while running the NARS.jar, and it says that it max uses 50 MB of the heapspace. I've set the initial and max size of heap...

Avoid an "out of memory error" in Java(eclipse), when using large data structure?

OK, so I am writing a program that unfortunately needs to use a huge data structure to complete its work, but it is failing with a "out of memory error" during its initialization. While I understand entirely what that means and why it is a problem, I am having trouble overcoming it, since my program needs to use this large structure and ...

How to free up memory?

We have been facing Out of Memory errors in our App server for sometime. We see the used heap size increasing gradually until finally it reaches the available heap in size. This happens every 3 weeks after which a server restart is needed to fix this. Upon analysis of the heap dumps we find the problem to be objects used in JSPs. Can JS...

realloc returns NULL after some time while allocating small (<500Kb) data block; there is enoug memory

Hi! The short question is: what can be the problem? The overall memory usage of my program (shown by task manager) is almost the same all the time (near 40 minutes) it's running, and I have near 2G more free memory. Running on win2003r2. Memory allocation/freeing is high enough - I need to interact with other software, preparing dat...

Out of memory when creating a lot of objects C#

I'm processing 1 million records in my application, which I retrieve from a MySQL database. To do so I'm using Linq to get the records and use .Skip() and .Take() to process 250 records at a time. For each retrieved record I need to create 0 to 4 Items, which I then add to the database. So the average amount of total Items that has to be...

Out-of-memory algorithms for addressing large arrays

I am trying to deal with a very large dataset. I have k = ~4200 matrices (varying sizes) which must be compared combinatorially, skipping non-unique and self comparisons. Each of k(k-1)/2 comparisons produces a matrix, which must be indexed against its parents (i.e. can find out where it came from). The convenient way to do this is to...

MySQL & PHP while code is out of memory, when there is only one row

Hey all, why is this code throwing an out of memory error, when there is only 1 row in the database.. $request_db = mysql_query("SELECT * FROM requests WHERE haveplayed='0'") or die(mysql_error()); $request = mysql_fetch_array( $request_db ); echo "<table border=\"1\" align=\"center\">";...