Thứ Bảy, 20 tháng 4, 2019

[ASP.NET] Exception of type 'System.OutOfMemoryException' was thrown khi load dữ liệu từ database

Lỗi do giới hạn bởi object trong .NET hoặc do sử dụng Entity Framework. Khi xử lý khối dữ liệu lớn đối tượng chiếm vượt quá bộ nhớ giới hạn có thể xử lý thì sẽ xuất hiện lỗi trên

The limitation of an object in .NET is 2GB, arrays can be bigger on 64bit machines but an EF context cannot be bigger than 2GB. And when using an EF context continuously the memory usage may increase rapidly until the limit is reached. To free memory it is therefore best to renew the context after a while when inserting many rows of data. So the limit is on .NET, not on EF as I mistakenly said before.

Từng gặp với NopCommercial :

https://www.nopcommerce.com/boards/t/52370/nopcommerce-4-systemoutofmemoryexception.aspx

https://stackoverflow.com/questions/45833276/system-outofmemoryexception-on-savechange-in-c-sharp-using-nopcommerce

Không có nhận xét nào: