. Net 4.5 executable program OutOfMemory,. netoutofmemory
Original article reprinted please indicate the source: @ cosi, http://zeeman.cnblogs.com
The newly deployed service on the production line stops for several times without reason. The system event shows that:
This service caches a large amount of data, and the memory usage is relatively large, but it is not OutOfMemory (the server memory is large). It is suspected that there are problems during compilation, looking at the project properties, we found that this Perfer 32-bit has a major suspicion. Remove this option and re-compile and deploy it. After one night, the problem is no longer solved. The reason is simple: the addressing space of a 32-bit operating system is 4 GB, of which 2 GB is occupied by the operating system, that is to say, the memory reserved for the user process is only 2 GB (excluding part of the space occupied by the image when the program is loaded, generally only 1. 6 GB ~ GB or so ). If the process needs to apply for memory while the operating system cannot allocate memory space for it, the exception of insufficient memory will occur. net is System. outOfMemoryException (The exception that is thrown when there is not enough memory tocontinue the execution of a program .).