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
Thứ Bảy, 20 tháng 4, 2019
[ASP.NET] SQL : The wait operation timed out
Do query thực thi quá lâu, mặc định timeout là 30s. Trường hợp này có thể set tăng timeout trong code thực thi query.
In your code where you run the stored procedure you should have something like this:
SqlCommand c = new SqlCommand(...)
//...
Add such a line of code:
c.CommandTimeout = 0;
This will wait as much time as needed for the operation to complete.
đây là 1 ví dụ về set timoute exute query
Trên vd đang set 0 là không limit , Bạn có thể set 60 hoặc 120 chẳng hạn
In your code where you run the stored procedure you should have something like this:
SqlCommand c = new SqlCommand(...)
//...
Add such a line of code:
c.CommandTimeout = 0;
This will wait as much time as needed for the operation to complete.
đây là 1 ví dụ về set timoute exute query
Trên vd đang set 0 là không limit , Bạn có thể set 60 hoặc 120 chẳng hạn
[WINDOWS] - Window 2012 - 2016 stuck at RDP - Please wait for the local session manager
I would like to report a huge bug in Windows Server 2012 and 2016. For 2012 I need to try multiple times to log in to system using RDP but for upgrading 2012 to 2016 I can't log in at all. Everything is described here:
Basically during RDP logging in process lsass.exe process is parsing ALL local users which takes too much time and incoming RDP session is being disconnected. As far as I can see in Windows Event log about 800-900 local users are being parsed before disconnection occurs.
During logging in process lsass.exe is using large amount of CPU but this is probably realted to checking registry:
As you can see in ProcessManager from time when RDP connection was made 21% of ALL Windows events logged in Process Manager was from lsass.exe process.
There is a easy way to replicate this issue:
I can replicate this bug
1) RDP to a newly created Windows Server
2) create a batch file with the following content:
:start
net user /add user%random%_%random% /random
timeout 1
goto start
open command prompt and execute the batch file.
Wait 20 minutes
try to RDP or connect via console. It won't work.
1) RDP to a newly created Windows Server
2) create a batch file with the following content:
:start
net user /add user%random%_%random% /random
timeout 1
goto start
open command prompt and execute the batch file.
Wait 20 minutes
try to RDP or connect via console. It won't work.
(and as far as I know it was replicated on MS side but for now nothing is being done or decided what to do with this problem).
Solution for this issue can be just extending RDP timeout which will work just fine because lsass.exe is using more CPU only during local users traversing and after logging in it just drops.
Any ideas/suggestions? Except "just use AD" ok? This specific scenario is on system which holds shared hosting accounts and local users are being used just for keeping website separated from each other and I really don't need AD for this one.
Solution from MS:
We found that each iteration (happening in LogonUI ) makes a call out to LSASS.exe which performs the UserLookup and returns the SID information. This is what it is taking time.
This kind of extensive lookup happens because of new functions introduced from Win2012 onwards.
To turn this lookup off, please add the following registry key ( both the locations ), reboot the machine and then test and let me know the results.
Location 1: HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System
Location 2: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Key: DontDisplayLastUserName
Type: DWORD
Value: 1
This kind of extensive lookup happens because of new functions introduced from Win2012 onwards.
To turn this lookup off, please add the following registry key ( both the locations ), reboot the machine and then test and let me know the results.
Location 1: HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System
Location 2: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Key: DontDisplayLastUserName
Type: DWORD
Value: 1
[ASP.NET] Lỗi liên quan SQL CLR , khi move DB qua server mới web không chạy
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly 'groupconcat, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A
loging in with sa, restoring DB again and setting TRUSTWORTHY ON
USE [apel_vn_db];
EXEC sp_configure 'clr enabled' ,1
GO
USE [apel_vn_db];
GO
EXEC sp_changedbowner 'sa'
USE [apel_vn_db];
GO
ALTER DATABASE [apel_vn_db] SET TRUSTWORTHY ON;
System.IO.FileLoadException: Could not load file or assembly 'groupconcat, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A
loging in with sa, restoring DB again and setting TRUSTWORTHY ON
USE [apel_vn_db];
EXEC sp_configure 'clr enabled' ,1
GO
USE [apel_vn_db];
GO
EXEC sp_changedbowner 'sa'
USE [apel_vn_db];
GO
ALTER DATABASE [apel_vn_db] SET TRUSTWORTHY ON;
Đăng ký:
Bài đăng (Atom)