[GODRIVER-1152] Memory leak in connection.ReadWireMessage Created: 19/Jun/19 Updated: 27/Oct/23 Resolved: 24/Jun/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Bartley | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I'm trying to switch from mgo to the mongo-go-driver in a relatively simple oplog tailing application. After a few hours, I observe rather high resident memory (multiple GiB). When I take a heap profile, it's implicating connection.ReadWireMessage; specifically "c.readBuf = make([]byte, size)". This is somewhat similar to |
| Comments |
| Comment by Divjot Arora (Inactive) [ 24/Jun/19 ] |
|
bartle I'm closing this ticket as it seems like the issue was caused externally. Also, the code for ReadWireMessage has changed in master to take a []byte rather than caching a buffer on the connection object itself, so the performance characteristics will change as well. |
| Comment by David Bartley [ 24/Jun/19 ] |
|
I did a bit more debugging and tracked it down to leaked Client's (i.e. Disconnect was not being called). |