Crystal icon indicating copy to clipboard operation
Crystal copied to clipboard

Memory management and GC need to be optimized in Server

Open liaojiaao opened this issue 1 year ago • 3 comments

I found that the memory doubled every time I restarted the server, starting at 2.6GB and then 5.2GB (etc). 我发现服务器重启时 内存一直变大,一开始启动2.6G,重启后(Control -> reboot Server) 内存就会翻倍,多重启几次就到8G 9G了。太疯狂了

I'm curious if there's memory management, or if the previous object isn't released every time I rebootserver 我好奇有没有内存管理,或者每次reboot server的时候之前的对象没有释放掉

Here's a snapshot of when I used VS debugging server, do you guys have any good suggestions or clues? 下面是我使用VS调试server时的快照,你们有什么好的建议或者头绪吗?

Image

liaojiaao avatar Jan 30 '25 16:01 liaojiaao

Yes, you are correct, the objects aren't being released/garbage collected as they're probably still being referenced somewhere in the server app, so they are duplicated every time you reboot the server using the menu option (or using the Stop/Start menu options I believe). Doesn't look like an easy fix so for now you need to actually close and re-open the server app every time.

makivellimir avatar Mar 06 '25 14:03 makivellimir

The Restart button should just be removed and leave Start/Stop as is.

JevLOMCN avatar Mar 06 '25 14:03 JevLOMCN

The Restart button should just be removed and leave Start/Stop as is.

This issue isn't related to the restart. The stop/start button does the exact same thing

Suprcode avatar Mar 06 '25 14:03 Suprcode