out-of-memory

Android JAVA - Service return OutOfMemoryError exception after some while

别来无恙 提交于 2019-12-03 21:46:20
I am developing my first android app. I have been created a Service class which role is to check if any new information on an external webpage. The HTTP request and service work as i should, but after a while I get these OutOfMemoryError . Are someone able to see where the Service gather all that memory? Error message 1. java.lang.OutOfMemoryError: pthread_create (stack size 16384 bytes) failed: Try again at java.lang.VMThread.create(Native Method) at java.lang.Thread.start(Thread.java:1029) at org.apache.http.impl.conn.tsccm.AbstractConnPool.enableConnectionGC(AbstractConnPool.java:140) at

Troubleshooting ERROR_NOT_ENOUGH_MEMORY

梦想的初衷 提交于 2019-12-03 20:16:09
问题 Our application is failing on one specific user's computer with ERROR_NOT_ENOUGH_MEMORY ("Not enough storage is available to process this command"). The error is apparently being raised somewhere deep within the Delphi VCL framework that we're using, so I'm not sure which Windows API function is responsible. Is memory a problem? A call to GlobalMemoryStatus gives the following information: dwTotalPhys - 1063150000 (~1 GB) dwAvailPhys - 26735000 (~27 MB) dwAvailPage - 1489000000 (~1.4 GB) It

Loading 26MB text data from database consume JVM heap of 258MB

别等时光非礼了梦想. 提交于 2019-12-03 17:36:48
An app (Spring, JPA Hibernate, Sybase 12, Webapp) when run locally on startup consumes 40MB of the 256MB heap space based on VisualVM. When I trigger a search that returns 70,000+ rows (text data no blobs) the heap space graph shoots up to 256MB and throws out of memory. I have resolved this by using setMaxResults(limit). However, when I queried the same data, copy-pasted to a text file and saved to the filesystem, I can see that the size is only 26MB worth of text. So in effect, 216MB(from 256-40) is consumed by loading a 26MB amount of text from the databases, who is consuming the 190MB by

OutOfMemoryError when using Gson to parse a large JSON response

三世轮回 提交于 2019-12-03 17:33:39
URL url = new URL("http://pubapi.cryptsy.com/api.php?method=orderdatav2"); CryptsyCurrencyPairsReturn response = gson.fromJson(new InputStreamReader(url.openStream()), CryptsyCurrencyPairsReturn.class); This results in an OutOfMemoryException for some of my users on older Android devices. How can I parse this large response without running out of memory? Parsing large data in one-go is always tricky and troublesome. However Gson comes with some nice features to support that too. You should look for com.google.gson.stream.JsonReader to perform json parsing using streams. This will allow you to

Apache Spark MLLib - Running KMeans with IDF-TF vectors - Java heap space

谁说胖子不能爱 提交于 2019-12-03 17:29:14
I'm trying to run a KMeans on MLLib from a (large) collection of text documents (TF-IDF vectors). Documents are sent through a Lucene English analyzer, and sparse vectors are created from HashingTF.transform() function. Whatever the degree of parrallelism I'm using (through the coalesce function), KMeans.train always return an OutOfMemory exception below. Any thought on how to tackle this issue ? Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at scala.reflect.ManifestFactory$$anon$12.newArray(Manifest.scala:138) at scala.reflect.ManifestFactory$$anon$12.newArray

Why is Internal memory in java Native Memory Tracking increasing

萝らか妹 提交于 2019-12-03 16:58:05
My application is running in a docker container, it use scala and use "OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)", its Xmx is set to be 16GB and container memory limit is 24Gb, after running for some time the container is killed: Last State: Terminated Reason: OOMKilled Exit Code: 137 However I can't find any "java.lang.OutOfMemoryError: Java heap space" errors in the log, not even once in last 2 weeks in all 48 nodes. So it's not likely a normal heap OOM. dmesg output: $ dmesg -l err,crit,alert,emerg STDIN is not a terminal [1647254.978515] Memory cgroup out of memory: Kill

ASP.NET C# OutofMemoryException On Large File Upload

痞子三分冷 提交于 2019-12-03 16:39:45
I have the following file upload handler: public class FileUploader : IHttpHandler { public void ProcessRequest(HttpContext context) { HttpRequest request = context.Request; context.Response.ContentType = "text/html"; context.Response.ContentEncoding = System.Text.Encoding.UTF8; context.Response.Cache.SetCacheability(HttpCacheability.NoCache); var tempPath = request.PhysicalApplicationPath + "\\Files\\TempFiles\\"; byte[] buffer = new byte[request.ContentLength]; using (BinaryReader br = new BinaryReader(request.InputStream)) { br.Read(buffer, 0, buffer.Length); } var tempName = WriteTempFile

OOM-killer with Java application on Linux

淺唱寂寞╮ 提交于 2019-12-03 16:27:27
I have a problem with my Java application on a Linux system (version 2.6.39.2) with 500MB RAM. Every hour my application takes 1-2MB resident memory more. The application starts with 40MB of resident memory used. After 15 days, OOM-killer kills my application (see attached log). More information: I haven’t set any memory limit (no Xms, Xmx, …) for my application. I have made a heap dump when 396MB of resident memory where used but for Memory Analysis tool, I only use 7.8MB of memory and there were no special memory leaks. What can I do to found the source of the problem or how to ensure that

OutOfMemoryException with gcAllowVeryLargeObjects

六眼飞鱼酱① 提交于 2019-12-03 16:10:36
问题 I'm using a BinarySerializer with a pretty big (althought not very deep) graph of items. I have 8GB of ram backed by 12Gig of swap and i'm getting an OutOfMemoryException when serializing which is expected ( it's possible the graph could go near or over 2Gb). However when i use gcAllowVeryLargeObjects it's no better, i still get the same exception and i'm definately working on something that should hold in memory (at least with the swap). Is there anything i could do to support serializing

Jenkins - java.lang.OutOfMemoryError: PermGen space -

。_饼干妹妹 提交于 2019-12-03 15:35:42
Environment: Linux/Windows7, Java 1.6.0.03/37 or 1.7 I downloaded jenkins.war and after the initial setup using the following script/command, I downloaded some plugins(10-15) and tried to restart Jenkins, it worked. Then, I got some more plugins (30-40 in total) and either I chose Install or download+then+install, Jenkins didn't come up. i.e. using startJenkins.sh (Linux only). Note: On Windows7 Jenkins started as a Windows service. #!/bin/bash export JAVA_HOME=/production/jenkinsAKS/java/jdk1.6.0_03 export JENKINS_HOME=/production/jenkinsAKS export PATH=${JAVA_HOME}/bin:${PATH} export JENKINS