From last year our server occasionally throws OutOfMemoryException, that is, the exception that is thrown when there is not enough memory to continue executing the program. This problem still occurs when server memory is added to 4G. The software is a UO third party simulator. In fact, from Task Manager, you can see that the software consumes about 1G of memory, of course, because of the GC, the actual software uses about 600M of memory. In order to avoid more than 1G of memory occupancy, and throw OutOfMemory exception, set the memory consumption to a certain value when the mandatory GC, can be deducted hundreds of trillion, but after all, not completely solve the problem.
Recently, foreign forums have been attached to the relevant processing methods, in this to repeat, I hope to encounter similar problems with friends help.
For servers with 2G of memory,. NET can only use 1.2G memory.
For servers with 4G of memory,. NET can use 2.4G of memory. However, the system requires the following settings:
1, in the Boot.ini file to add/3GB switch.
[boot loader]
Timeout=30
Default=multi (0) disk (0) rdisk (0) partition (2) \WINNT
[Operating Systems]
multi (0) disk (0) rdisk (0) partition (2) \winnt= "????"/3GB
2, in the Command Line window, enter the directory, such as CD "C:\Program Files\Microsoft Visual Studio. NET 2003\vc7\bin"
3, Run link command: Link-edit-largeaddressaware server.exe (Server.exe for your. NET program)
4, your server.exe can be used to 2.4G memory.
. Net 1.2 does not seem to solve the problem, the new 2.0 is not available to do the test, do not know whether 2.0 in memory management and GC performance on the big changes.
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.