out-of-memory

System.OutOfMemoryException

笑着哭i 提交于 2019-12-25 04:49:25
问题 I have a program written in asp.net with lucene.net. At first I create an index from 28000 documents. Secondly I'm executing a search, but sometimes there is an error. (I think this error is thrown when there are many results) The important part of code: Dim hits As Hits = searcher.Search(query) Dim results As Integer = hits.Length() 'ergebnisse (größe der hits) '##################### '####### RESULTS ##### '##################### trefferanzahl = results If (results > 0) Then Dim i As Integer

Outofmemoryerror ByteArrayOutputStream sending large file to WS

…衆ロ難τιáo~ 提交于 2019-12-25 04:17:36
问题 im sending videos to webservice and works ok with videos less than 10MB, if the video is about 12MB give me outofmemoryerror: This is my code: FileInputStream fileInputStream = new FileInputStream(fichero); int bytesAvailable = fileInputStream.available(); int maxBufferSize = 1024 * 1024 * 2; int bufferSize = Math.min(bytesAvailable, maxBufferSize); byte[] buffer = new byte[bufferSize]; int bytesRead = fileInputStream.read(buffer, 0, bufferSize); while (bytesRead > 0) { dos.write(buffer, 0,

WCF Streaming System.OutOfMemoryException

大城市里の小女人 提交于 2019-12-25 04:15:01
问题 In my streamed WCF application I get System.OutOfMemoryExceptions in my service for large messages (querying >7GB MSSQL tables using a datareader, messages might even exceed 7GB) while small messages work just fine. I can observe the memory usage grow constantly during the execution of DataReaderToExcelXml (see below). The weird thing is, that it usually grows fast to 2GB, stays at 2GB +-1GB for a while (1-5 minutes) and then again raises very fast to ~6.5GB which leads to the exception

Android throwing out of memory error when trying to load 1 megabyte image

Deadly 提交于 2019-12-25 03:57:49
问题 The relevant code: runOnUiThread(new Runnable() { @Override public void run() { ImageButton btn = (ImageButton) findViewById(R.id.info_image); btn.setImageResource(currentID[currentIDPos]); } }); It's saying that the run method is making a 400-some megabyte allocation. My jpgs are no more than a megabyte in size. The run() method is called on a timer every 3-4 seconds or so and on click, but that shouldn't matter because from what I can tell using printlns the run() is only called once before

perl regex using too much memory?

我的梦境 提交于 2019-12-25 02:19:27
问题 I have a perl routine that is causing me frequent "out of memory" issues in the system. The script does 3 things 1> get the output of a command to an array (@arr = `$command` --> array will hold about 13mb of data after the command) 2> Use a large regex to match the contents of individual array elements --> The regex is something like this if($new_element =~ m|([A-Z0-9\-\._\$]+);\d+\s+([0-9]+)-([A-Z][A-Z][A-Z])-([0-9][0-9][0-9][0-9]([0-9]+)\:([0-9]+)\:([0-9]+)|io) <put to hash> 3> Put the

Parallel.ForEach - System Out of Memory Exception

ぐ巨炮叔叔 提交于 2019-12-25 02:17:15
问题 I have a problem with my website crawler as I get System Out of Memory Exception after it crawls something around 700 URLs. Memory usage is raising from the start and in one moment program just stops. It is a console application written in C#. I think the problem is that i instantiate 6 new objects at every foreach loop. Than i pass through them, get property values with reflection and create the final object that i use to DB save. I expect .NET to destroy those object when not using them

how to fix memory error while using np.r_

三世轮回 提交于 2019-12-24 23:52:25
问题 I have a list with 482000 entries. The structure of the array is like this: X_docs = [array([0., 0., 0., ..., 0., 0., 0.]), array([0.60205999, 0.60205999, 0.47712125, ..., 0. , 0. ,0.])] each array have 5000 entries. so in the end we have 482000 * 5000 . Then I need to apply np.r over it like this: np.r_[X_docs] When it reaches this line it raises this error: MemoryError I dont know how to fix this? is there any limitation regarding the numpy thing? I have 32 gig ram. I even tried to run it

Parsing Highly Nested XML without DOM in Java

吃可爱长大的小学妹 提交于 2019-12-24 21:04:57
问题 I've been tasked with fixing a rather irritating Heap out of memory issue. IBM offers a Cognos SDK that we use with Java, and we query all of the packages stored on a content store, which are returned in an xml format. Then we parse that xml and write it to a sql database. Profiling reveals that the worst memory issues are caused by Char[], which isn't very helpful (and the heaps are so large it's hard to profile), but does point towards the DOM parser. We're talking 500-1500 xml files (well,

In Fortran, how to write backward from a file to another file by blocks of line from bottom to top

时光总嘲笑我的痴心妄想 提交于 2019-12-24 20:15:35
问题 I have an ASCII file that looks like: ____________________________________________ Header1 ... Header2 ... Header3 ... block(1)data1 block(1)data2 block(1)data3 block(1)data4 block(1)data5 block(1)data6 block(2)data1 block(2)data2 block(2)data3 block(2)data4 block(2)data5 block(2)data6 ... block(n)data1 block(n)data2 block(n)data3 block(n)data4 block(n)data5 block(n)data6 ____________________________________________ I would like to convert it into an ASCII file that looks like: ______________

java.lang.OutOfMemoryError in my android application

只愿长相守 提交于 2019-12-24 19:45:25
问题 I have 18 images which create a flower when overlap eachother as a stack in my and app. All images are added to activity in XML file android:src:'@drawable/blabla..' ... However when I run my app , it returns an error java.lang.OutOfMemoryError .Please help me... I dont know how I can solve this problem.Thank you... public class PapatyaFaliActivity extends Activity { private int[] startLeafID={R.id.imag,R.id.birstart,R.id.ikistart,R.id.ucstart,R.id.dortstart,R.id.besstart,R.id.altistart,R.id