Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Memory leak in Go http standard library? (stackoverflow.com)
10 points by ancarda on Jan 12, 2014 | hide | past | favorite | 7 comments


Stack Overflow questions with interesting answers are good bets for HN, but Stack Overflow questions about individual bugs with no answers aren't; they seem more like attempts to game Stack Overflow, and, at the very least, crud up HN. I actually flagged this.


I didn't think it would be interpreted that way. My bad. It seems like it's not a leak in the http library, just allocating memory and not releasing it sooner than expected.


https://groups.google.com/forum/#!forum/golang-nuts is the best place to ask Go related questions, not HN.


I would argue that a serious memory leak in one of the core functions of such a popular and trending language is news worthy.


It's highly unlikely that there is a memory leak.


I've been running the code he posted with ApacheBench and I'm not seeing any issues.


Go provides very adequate profiling tools for debugging this type of problem.

http://blog.golang.org/profiling-go-programs

FWIW, I did `ab -n 1million -c 100` with your program on Windows/amd64 and memory grew from from 3.4MB to 3.9MB.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: