memory issues at long runtimes

I have been using sing-box for a long time, and given the network topology in Iran, I have opted for using a domestic relay and a foreign server setup. A problem that has been bugging me for a very long time is that sing-box’s memory usage slowly increases over time and that is quite odd. The domestic server which is the relay reaches 100 200 MB which is normal, but the foreign server reaches +400MB which is a lot, and the memory usage does not decrease in the late hours ( like 3 in the morning, when the usage is pretty low ) which suggests that it is not related to temporary spikes due to load. I have a fork and have enabled pprof to investigate the issue and observed a few points: first the memory usage shown in the heap profile is around 1/3 of the memory usage reported by the systemctl, given the ram usage does not decrease in the low load hours, I believe it can be concluded that the difference in the reports is not due to GC keeping memory for later consumption and either there is a certain goroutine which is holding the memory in stack or the memory is used by the OS for the app, like in TCP connections held by the kernel for the app. second, in the goroutine section there are some very very long running goroutines ( like for days ) that are quite abnormal, more details can be provided if anyone was interested in investigating this. and third, TCP connections between the domestic relay and the foreign server seem to never get closed, though I easily fixed this in my fork using deadlines to close idle connections, this could alert a more sever problem deep in the code. If there is any interest in investigating this issue I can provide all the needed details like pprof data, my config and to maintainers, access to my servers to analyze the problem in depth. Let me know if I can help with anything.