I encountered an OutOfMemoryException exception 2008-11-28 09:52
The after-Sales service system of ASP has been running for nearly 1 years, and yesterday, when the data was exported in the year, OutOfMemoryException anomaly occurred, and the data volume was about 50M. 50M should not be very large, put in the database is also tens of thousands of (a lot of table fields). The settings for the IIS
The system on the customer's server has been running stably for several years. After the customer changed the new server (dual-4-core CPU, 8 GB memory) for a while, it suddenly became unavailable, after you open the home page or log on successfully, system appears immediately. outofmemoryexception error. The system crashes completely.
After asking Gu Ge and Du Niang, the following conclusions are obtained:
On the ASP. NET web (u8soft. appserver) serve
! = null) { bi.close (); } if (fi! = null) { fi.close ();} } catch (IOException e) { bp = null; } } return BP; }the problem arises, because the displayed picture is too large, so there will be outofmemoryexception. I think I can catch the exception to retrieve the picture and reload, so I want to find a solution from the Internet
People who believe that doing large web applications in ASP.net have encountered outofmemoryexception this anomaly, I have studied this issue for a long time and have learned the reason for this problem in Microsoft's technical documentation and, to tell you the truth, I still don't have the perfect solution, and here's just some of the experience I've been working on. Come out and share with everyone, as much as possible to avoid this problem.
1) Fi
I saw an article "How to Handle outofmemoryexception?", So I 'd like to share with you the problem of outofmemoryexception in ASP. NET.
In fact, on the ASP. NET web server, the memory that ASP. NET can use is generally not equivalent to the total amount of memory. In the machine. in the config configuration file, the configuration section
When we have a server with a large memory, the value of "memorylim
displayed picture is too large, so there will be outofmemoryexception. I think I can catch the exception to retrieve the picture and reload, so I want to find a solution from the Internet, what manual intervention GC, what will the picture weaken what use weak references to save the picture, some summed up particularly good (http://mzh3344258.blog.51cto.com/1823534 /804237), these methods I one by one try but the problem is still unresolved. Constant
Debug Asp.net todayProgramWhen, report
"System. outofmemoryexception: insufficient memory" is an exception. I was puzzled at the beginning. I thought it was really out of memory. I also checked the memory usage and browsed it out. A search on the Internet found that the referenced image could not generate an object. I am really embarrassed.
Many people have encountered such a problem on the Internet. I have recorded the problem so that it can be enc
introduction in this regard.
Ii. How to Handle outofmemoryexceptionUnder what circumstances will outofmemonryexception occur? Reference
My current concerns are:1. If a change exception is thrown if no available memory is found for the new object, can the application_error event of httpmodule capture the change error? My idea is that even if it can be captured, it cannot be processed, because custom exception handling still requires memory to run, so no matter whether it can be captured,
Author: Chainet from: cnblogs
Introduction
The product I participated in was a relatively large ASP. NET system. If the system runs for a long time in the testing department and the customer, the system usually encounters an outofmemoryexception. There are many causes of memory overflow errors, mainly in the server configuration and code writing aspects can be optimized and improved, to avoid such problems, but completely put an end to it is more dif
ArticleDirectory
Not enough storage ...?
Its a software problem.
The hack... err, solution.
Look at all that memory!
Original address
Visual Studio can be a tremendous resource hog, especially if youHave a large solution
Summary of common scenarios and processing methods for. Net Memory Overflow (system.outofmemoryexception)Under what circumstances will the outofmemonryexception appear? We can catch the exception when we try to create a new object, and the garbage collector cannot find any available memory. Another scenario is when the CLR needs memory, but the system does not provide it, and it throws the exception. But at this point, our application is not able to catch the error.Debug Analysis of Memory overf
Just looking at the RSS list, see a piece of such information, I do not know if it is helpful to you.------------------------------------------------------------------------------------------ Asp. NET in the OutOfMemoryExceptionIn the blog Park saw a friend wrote the article "How to deal with OutOfMemoryException exceptions." , so I want to communicate with you about the problem of outofme
In this article, we will talk about the relationship between the garbage collector and the virtual memory and physical memory of the program. Let's talk about how to determine whether your managed heap is healthy. Why does the program throw an OutofMemoryException when the machine has a large amount of memory.
Relationship between garbage collection and physical memory virtual memory:
If you know this topic well, skip this section.
GC needs to allocat
exchange between the memory and the disk. In my machine, Dataset grew to 1400000 records before the machine ran out of memory.
Exhausted memoryWhat will happen when you run out of memory depends on whether you are running the program or the compile version of the program in the VS. NET environment. If you are running the compiled version of the program without error handling, you will not find any errors during the program running. It only stops running when the memory is exhausted. If you run
ArticleDirectory
Capacity
Speed (access time)
Introduction
This article describes the ambiguous outofmemoryexception that is often triggered when memorystream is used to process large data sets, and introduces a class --Memorytributary, which can be used to replace. Net's built-in memorystream and support the processing of large data. Background
When trying to use memorystream to process large data (in the order of tens of MB), it us
not possible to allocate more memory to this process, so outofmemoryexception is likely to be thrown out. In order to avoid this, we have to make the "memorylimit" appropriately smaller so that IIS can recycle the process earlier. Microsoft recommends that the ASP. NET process occupy memory is not more than 60%, and it is best to make the calculated actual value not more than t= "on" >800M. for a server t= "on" >4g memory, it is best to set the
Database version 10g Oracle JDBC driver
The original 10g driver used a relatively primitive memory management method. This memory management method is designed to achieve the highest performance. When a P reparedstatement is executed for the first time, the necessary byte[] and char[] buffer will be assigned. That's it. The buffer is released only when the PreparedStatement itself is released (Freed) (freed). Implicit Statement cache does not do anything for managing buffer. All implicit State
One of the strangest problems we've encountered during development is that when the software loads a lot of large data, there are occasional outofmemoryexception exceptions, but there's a lot more memory available through the memory checker. We suspect that the total amount of available memory is sufficient, but there is not enough contiguous memory-that is, there are a lot of unallocated memory gaps. But not that. NET runtime's garbage collector comp
. Connection = connection;Cmd. CommandTimeout = 99999999;DateTime begin = DateTime. Now;Adapter. SelectCommand = cmd;Table. Locale = System. Globalization. CultureInfo. InvariantCulture;Table. Clear (); // clear the original data and prepare to load new data. If this process is not performed, the line data will be added to the original dataAdapter. Fill (table );Datetime end = datetime. now;// MessageBox. Show ("query time" + (end-begin), "execution completed! ");Bindingsource. datasource = tabl
signed:
NEWARR
NEWOBJ (when creating arrays).
This is affects their behavior when given a negative number. Previously, these opcodes treated the negative number as a unsigned number (which would look very big), and thus threwOutOfMemoryException. Now they would throw an OverflowException.
The C # compiler already performed this test implicitly, so C # code would not notice this change (they already did the new S Emantics).
Only the code that catches OutO
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.