out-of-memory

How to do thread dump on Out Of Memory Error [duplicate]

荒凉一梦 提交于 2019-12-06 06:10:16
This question already has answers here : how to generate thread dump java on out of memory error (6 answers) Closed 6 years ago . I know that -XX:+HeapDumpOnOutOfMemoryError will enable heap dump on OutOfMemoryError. Is there anything similar for thread dump? I need this in case when error happens on server - I don't have access to process itself when it happens zagyi The exact point of execution where an OutOfMemoryError is raised is very much random (unless you have a single threaded application), so I don't think it would make too much sense to get a thread dump upon OOM. At least this is

GC too frequency under heavy load with Mule3.2

本秂侑毒 提交于 2019-12-06 06:02:30
Under heavy load with Mule 3.2(100 threads send requests concurrently), through jprofiler, I could see that lots of object instances are created(about 500mb every second), and occupied over 90% space of the young area of the heap, which caused the jvm to trigger gc every 2 seconds. why? Does this normal? Or is it a bug in jvm arguments: -Xms=2048m -Xmx=2048m -Xmn=768m -XX:PermSize=256m -XX:MaxPermSize=512m -Xss256k -XX:+UseConcMarkSweepGC thanks For every request that Mule receives, numerous objects are created (session, event, message, anonymous classes that act as closures in many places).

Java needed memory for new thread

淺唱寂寞╮ 提交于 2019-12-06 05:52:57
I have an application which massively creates threads. As result I get an OutOfMemoryError . My idea is to wait until there is enough free space to create the next Thread . But therefore I need to know how many memory I need to create a thread and if this amount of memory is available. Is there a way to get the amount of memory a thread needs? And how can I determine if this amount of memory is available? What I've already tried: for (int i = 0; i < links.size(); i++) { while(Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory() + Runtime.getRuntime().freeMemory() < MEMORY

Best way to avoid out of memory exception in application

谁说胖子不能爱 提交于 2019-12-06 05:51:31
We are designing a Stress Test Application which will send mass HTTP requests of size "1 MB" to a particular Web Service. To achieve stress, we are using multiple threads in the application. Structure is something like we have X EnqueueThreads which will create the HTTPRequest data and they will add it them to the queue. And the Y WorkerThreads will dequeue the requests and they will submit to web service. All requests are aysnchronous. Now the problem here is, Enqueue threads are working much faster than WorkerThreads so if there is no stop/wait condition, they will add the requests until the

OutOfMemoryError: bitmap size exceeds VM budget

蹲街弑〆低调 提交于 2019-12-06 05:11:43
Sorry it seems like a repeated question, BUT I think I don't qualify to any of the recommendations already posted. I've a Gallery of maximum 20 images on my application. After playing a while flinging back and forth I'm getting OutOfMemoryError. The strange thing is that I don't hold any static references, and I've searched for possible memory leaks I can assure that I've not found one so far. Anyway, 20 images (PNG of 100KB on average) doesn't be like that much. And I've implemented a view cache, SoftReference holders for the bitmaps, etc. Is it 20 PNG images of 100KB on average enough to

Multiprocessing - using the Managers Namespace to save memory

岁酱吖の 提交于 2019-12-06 04:51:54
I have several processes each completing tasks which require a single large numpy array, this is only being read (the threads are searching it for appropriate values). If each process loads the data I receive a memory error. I am therefore trying to minimise the memory usage by using a Manager to share the same array between the processes. However I still receive a memory error. I can load the array once in the main process however the moment I try to make it an attribute of the manager namespace I receive a memory error . I assumed the Managers acted like pointers and allowed seperate

How to Debug “Fatal error: Out of memory (allocated XXX) (tried to allocate XXXXX bytes)”? [closed]

≡放荡痞女 提交于 2019-12-06 04:39:13
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center . Closed 8 years ago . Looking through StackOverflow I realized out-of-memory-errors are a common problem. As suggested by others it can under some circumstances be managed by increasing the memory limit in the php.ini.But often this doesn't solve the error as there is a problem within the coding. What are most common sources of this

Insufficient memory when opening TClientDataSet with a REPLACE in the underlying query

不羁的心 提交于 2019-12-06 03:51:39
My Delphi code opens a TFDQuery (FireDAC), then opens the TClientDataSet connected to it via a TDataSetProvider : ClientDataSetData.Close; with QueryData do begin Close; SQL.Clear; SQL.Add(ASelectSQL); Open; end; ClientDataSetData.Open; ASelectSQL contains this SQL: SELECT TT_NIV_ID, TT_NIV, REPLACE(TT_NIV_NAME, '|', '!') as TT_NIV_NAME2 FROM TT_SYS_PRJ_NIV The ClientDataSetData.Open gives an insufficient memory error on a dataset with 42200 records. If I inspect the result data (in the Delphi code) I see that TT_NIV_NAME2 is a string of length 8000! From the REPLACE() documentation : If

Python: Unpredictable memory error when downloading large files

这一生的挚爱 提交于 2019-12-06 03:49:50
问题 I wrote a python script which I am using to download a large number of video files (50-400 MB each) from an HTTP server. It has worked well so far on long lists of downloads, but for some reason it rarely has a memory error. The machine has about 1 GB of RAM free, but I don't think it's ever maxed out on RAM while running this script. I've monitored the memory usage in the task manager and perfmon and it always behaves the same from what I've seen: slowly increases during the download, then

Validating a large XML file ~400MB in PHP

走远了吗. 提交于 2019-12-06 03:17:58
问题 I have a large XML file (around 400MB) that I need to ensure is well-formed before I start processing it. First thing I tried was something similar to below, which is great as I can find out if XML is not well formed and which parts of XML are 'bad' $doc = simplexml_load_string($xmlstr); if (!$doc) { $errors = libxml_get_errors(); foreach ($errors as $error) { echo display_xml_error($error); } libxml_clear_errors(); } Also tried... $doc->load( $tempFileName, LIBXML_DTDLOAD|LIBXML_DTDVALID ) I