TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.48k stars 431 forks source link

Memory leak #640

Closed JeanPaulLucien closed 1 year ago

JeanPaulLucien commented 1 year ago

When I tried to use this program I have received that my RAM has gone. Task manager reported about over 80% total consumed RAM. The program steal about 50% amount of RAM.

ShreyasZare commented 1 year ago

Thanks for the post. Post more details like how much RAM does your computer have and how much RAM is the DNS server taking. Also post number of domain names that are shown on the Dashboard for "Block List".

JeanPaulLucien commented 1 year ago

I just installed DNS server and tried to use.

ShreyasZare commented 1 year ago

I just installed DNS server and tried to use.

If you have just installed it and running have not modified any settings then the DNS server takes less than 100MB of RAM. If you need help with the issue then you have to provide more details like screenshot of the Dashboard, Task manager, etc. with details of your hardware and your OS.

JeanPaulLucien commented 1 year ago

Nothing to show, it's icon in tray only. After PC restart the program starts, because autostart and memory leak with OS start..

ShreyasZare commented 1 year ago

Nothing to show, it's icon in tray only. After PC restart the program starts, because autostart and memory leak with OS start..

You can right click the system tray icon and there is Dashboard menu item which is the first menu item in there. Also, I mentioned in the other issue you posted on how to stop the DNS server from running at startup from Windows Services console. You should follow those instructions and update the startup type to Manual.

Also, you have not mentioned which OS do you use. I can only help if you provide more details.

JeanPaulLucien commented 1 year ago

Dashboard is not available. I click Start, get memory leak, Stop is grey, so I kill process. Windows 7.

ShreyasZare commented 1 year ago

Dashboard is not available. I click Start, get memory leak, Stop is grey, so I kill process. Windows 7.

How did you come to the conclusion that its memory leak? If the Stop button is not enabled then the Windows Service has not started yet. Check the Windows Event Viewer to see if there are any errors logged.

I hope you have the prerequisites installed on Windows 7 that was mentioned in issue #638.

JeanPaulLucien commented 1 year ago

How did you come to the conclusion that its memory leak? Task manager. I could use another tools, but it was not needed.

I found an old error event in journal:

[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <System>
  <Provider Name="MsiInstaller" /> 
  <EventID Qualifiers="0">1032</EventID> 
  <Level>3</Level> 
  <Task>0</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2023-05-24..." /> 
  <EventRecordID>703447</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>...</Computer> 
  <Security UserID="..." /> 
  </System>
[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <EventData>
  <Data /> 
  <Data>(NULL)</Data> 
  <Data>(NULL)</Data> 
  <Data>(NULL)</Data> 
  <Data>(NULL)</Data> 
  <Data>(NULL)</Data> 
  <Data /> 
  </EventData>
  </Event>
JeanPaulLucien commented 1 year ago
[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <System>
  <Provider Name=".NET Runtime" /> 
  <EventID Qualifiers="0">1023</EventID> 
  <Level>2</Level> 
  <Task>0</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2023-05-24..." /> 
  <EventRecordID>703458</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>...</Computer> 
  <Security /> 
  </System>
[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <EventData>
  <Data>Description: A .NET application failed. Application: DnsService.exe Path: C:\Program Files (x86)\Technitium\DNS Server\DnsService.exe Message: GC heap initialization failed with error 0x8007000E Failed to create CoreCLR, HRESULT: 0x8007000E</Data> 
  </EventData>
  </Event>
[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <System>
  <Provider Name=".NET Runtime" /> 
  <EventID Qualifiers="0">1023</EventID> 
  <Level>2</Level> 
  <Task>0</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2023-05-24..." /> 
  <EventRecordID>703460</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>...</Computer> 
  <Security /> 
  </System>
[-](https://github.com/TechnitiumSoftware/DnsServer/issues/640#) <EventData>
  <Data>Description: A .NET application failed. Application: DnsServerSystemTrayApp.exe Path: C:\Program Files (x86)\Technitium\DNS Server\DnsServerSystemTrayApp.exe Message: GC heap initialization failed with error 0x8007000E Failed to create CoreCLR, HRESULT: 0x8007000E</Data> 
  </EventData>
  </Event>
JeanPaulLucien commented 1 year ago

Well... This logs say "out of memory".

ShreyasZare commented 1 year ago

Thanks for the error details. This seems to be very specific issue with your setup since the DNS server is tested to work on Windows 7 SP1 with 2GB RAM on the system.

Task manager. I could use another tools, but it was not needed.

How much memory do you have on the machine?

JeanPaulLucien commented 1 year ago

How much memory do you have on the machine?

8 GB

ShreyasZare commented 1 year ago

How much memory do you have on the machine? 8 GB.

Not sure why its not working on your setup. If possible try it on another machine or upgrade the OS of the current machine.

Zorlin commented 1 year ago

Windows 7.

Windows 7 has been End of Life'd for over 3 years now. It's dangerous to run.

echodreamz commented 1 year ago

Windows 7.

Windows 7 has been End of Life'd for over 3 years now. It's dangerous to run.

Going to agree here... Technitium should focus it's dev efforts towards supported operating systems, 7 has been EOL for 3 years, not 3 weeks, it would different if support just ended, but it's time to move on.

ShreyasZare commented 1 year ago

Windows 7.

Windows 7 has been End of Life'd for over 3 years now. It's dangerous to run.

Going to agree here... Technitium should focus it's dev efforts towards supported operating systems, 7 has been EOL for 3 years, not 3 weeks, it would different if support just ended, but it's time to move on.

Yup, using unsupported OS is a big security risk. Its best to either upgrade or switch to linux since if any issue exists with .NET running on this platform then its not going to get fixed by Microsoft. Application developers like me cannot help with such issues.