We have a websocket service based on go-socket.io( the socket.io golang 
implementation), but seems have a memory leak problem. I also have opened a 
same topic ,but the problem is not be resolved.  I also enable the 
debug.FreeOSMemory, the idle heap now will be released back to OS, but the 
heap alloc always increase. I collect the new pprof data, and also found 
something interesting.

1. heap in-use space callgraph

<https://lh3.googleusercontent.com/-mm2uAP5ihFM/V9IVWSlqUFI/AAAAAAAAAFc/8lLdQ3XgKCgeuCxQN81VQ8U5mDJcQxvWQCLcB/s1600/heap_in_use.png>



2. heap alloc space callgraph

<https://lh3.googleusercontent.com/-zKpnnKowYcc/V9IV5Ncxs3I/AAAAAAAAAFg/hcptQ-bmiwsmRbFYnvTEB9jNylbJ8nh3gCLcB/s1600/heap_alloc.png>


3. goroutine callgraph

<https://lh3.googleusercontent.com/-eIy8KrAVfHA/V9IWPA4Mc7I/AAAAAAAAAFo/c-VvfT8AFLM3IjfTYEYPHDOKVoq3SA8fgCLcB/s1600/groutine.png>


I also attach the pprof pdf file.


Problem:
1.  When the request hijack to the websocket conn, the 
*net/http.(*conn).serve *goroutine will return immediately, but why the 
*net/textproto.(*Reader).ReadMIMEHeader 
*(contains in net/http.readRequest which located in net/http.(*conn).serve) 
take 
so much memory in the heap in-use callgraph?
2. Is there any other tool can inspect the memory leak problem?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: comet_goroutine.pdf
Description: Adobe PDF document

Attachment: comet_alloc_space.pdf
Description: Adobe PDF document

Attachment: comet_inuse_space.pdf
Description: Adobe PDF document

Attachment: comet_inuse_objects.pdf
Description: Adobe PDF document

Reply via email to