out-of-memory

Best way to handle huge fields with GSON JsonReader

二次信任 提交于 2019-12-06 13:40:40
I'm getting a java.lang.OutOfMemoryError: Java heap space even with GSON Streaming. {"result":"OK","base64":"JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC...."} base64 can be up to 200Mb long. GSON is taking much more memory than that, (3GB) When I try to store the base64 in a variable I get a: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2367) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114) at java.lang

MVVMCross Nested Recyclerview Out of Memory Issue

半城伤御伤魂 提交于 2019-12-06 13:22:36
I have tried to create nested recyclerview in combination with the mvvmcross-framework which actually worked quite easily, but now I'm getting out of memory exceptions. Scenario I have a list of around 3000 entries with complex and long names, which are divided by 8 categories. The user can select the entries via a checkbox to assign them to a task later on. Even if it might sound like there are too many entries, it is actually quite easily to navigate through them, if the user has some background knowledge, so I would rather not change it at this point. Code First the simplified data models

How to free image cache/memory in Windows Phone 8?

怎甘沉沦 提交于 2019-12-06 12:18:46
问题 In my Windows Phone 8 application I have a page with a LongListSelector which is bound to a list of 1000 objects having a property for base64string for image. Now to display the image, I wrote this converter to convert the bas64string into a stream . public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (!value.ToString().Contains("http://")) { string str = value.ToString(); byte[] bytes = Converter.FromBase64String(str); using

Java crashing before filling up heap space

对着背影说爱祢 提交于 2019-12-06 12:11:33
问题 I have this java simulator that will need to handle a huge amount of data. It works fine, but one I get up to an array of int[100000][100][2] along with other big arrays. the program says that its out of memory. ( Java.lang.outOfMemoryError ) All fine and good, I just give it more memory, but It seems to always run out around ~300M even though I allow it 2GB. This is all from watching Task manager. Is there something wrong with my system, or is this just a java thing that I need to deal with?

OutOfMemoryException - out of ideas

回眸只為那壹抹淺笑 提交于 2019-12-06 11:27:41
问题 I know there is no simple answer to my question but I would appreciate ideas, guides or some sort of things-to-look-at list I have a net Windows service that is constantly throwing OutOfMemoryException. The service has two builds for x86 and x64 Windows. However on x64 it consumes a lot more memory. I have tried profiling it with various memory profilers. But I cannot get a clue what the problem is. The diagnosis - service consumes lot of VMSize and crashes app after 3 to 12 hours. The

How can I fix frequent Out Of Memory Errors on Android emulators?

旧街凉风 提交于 2019-12-06 11:20:09
问题 I test a mobile app and have been struggling with constant crashes of the app when I use an Android emulator. I have no problem on physical Android devices, but emulators crash several times per day. The app will crash quite consistently once I find a crash-prone part of the app's "workflow". But exactly where in the app will trigger a crash seems to vary from version to version. Here is the crash report : Android: 2.3.7 Model: Full Android on x86 Emulator java.lang.OutOfMemoryError: bitmap

Virtual and Physical Memory / OutOfMemoryException

痴心易碎 提交于 2019-12-06 11:15:55
I am working on a 64-bit .Net Windows Service application that essentially loads up a bunch of data for processing. While performing data volume testing, we were able to overwhelm the process and it threw an OutOfMemoryException (I do not have any performance statistics on the process when it failed.) I have a hard time believing that the process requested a chunk of memory that would have exceeded the allowable address space for the process since its running on a 64-bit machine. I do know that the process is running on a machine that is consistently in the neighborhood of 80%-90% physical

How to handle OUT OF MEMORY error for multiple threads in a Java Web Crawler

血红的双手。 提交于 2019-12-06 09:43:49
I'm fairly new to programming and am working for my dissertation on a web crawler. I've been provided by a web crawler but i found it to be too slow since it is single threaded. It took 30 mins to crawl 1000 webpages. I tried to create multiple threads for execution and with 20 threads simultaneously running the 1000 webpages took only 2 minutes. But now I'm encountering "Heap Out of Memory" errors. I'm sure what i did was wrong which was create a for loop for 20 threads. What would be the right way to multi-thread the java crawler without giving out the errors? And speaking of which, is multi

java out of memory then exit

会有一股神秘感。 提交于 2019-12-06 09:43:00
I have a piece of software that has to analyze big files. Constraining the input or giving infinite memory is not an option, so I have to live with flying OOMEs. Because the OOME only kills the Thread, my software runs in some crappy state. From outside everything looks okay because the process is running but on the inside it's braindead. I would like to pull the plug on it. But how can I do this? Catching a OOME does not guranteee that the next line of code will be executed. e.g System.exit(9). So the JVM has to notice OOME and destory itself. Is their some vm option for this? When you get an

Out of memory exception in my code

我们两清 提交于 2019-12-06 09:42:05
I am running a code for long hours as part of a stress test on an Oracle db and using java version "1.4.2". In a nutshell, what I am doing is : while(true) { Allocating some memory as a blob byte[] data = new byte[1000]; stmt = fConnection.prepareStatement(query); // [compiling an insert query which uses the above blob] stmt.execute(); // I insert this blob-row in the database. stmt.close(); } Now I want to run this test for 8-10 hrs. However apparently after inserting about 15million records I hit the java.lang.OutOfMemoryError I am running this with -Xms512m -Xmx2g . I tried using higher