pokt-network / poktroll

The official Shannon upgrade implementation of the Pocket Network Protocol implemented using Rollkit.dev
MIT License
15 stars 7 forks source link

[☂️ Bug] Memory leaks: relay stress test #463

Open bryanchriswhite opened 3 months ago

bryanchriswhite commented 3 months ago

f## Objective

Enumerate unique causes of memory leaks evident in the relay stress test scenario. This issue to be closed when all leaks tracked by it are resolved.

Origin Document

Supporting documentation:

Goals

Deliverables

Non-goals / Non-deliverables

General deliverables


Creator: @bryanchriswhite Co-Owners: @red-0ne

okdas commented 2 months ago
  1. 450 added some reader closures that might have been a part of the problem, I can check if the situation changed at all on main branch with this change.

  2. I think the best way to troubleshoot it is to expose pprof on a separate port (configurable via the config file): https://pkg.go.dev/net/http/pprof - I can pick it up next week
Olshansk commented 2 months ago

I think the best way to troubleshoot it is to expose pprof on a separate port (configurable via the config file): pkg.go.dev/net/http/pprof - I can pick it up next week

Please add a TODO in the appropriate place (or create an issue if you think it needs one) depending on how long git'll take.

bryanchriswhite commented 2 months ago

Closing as memory leaks seem to have subsided (for now) as a result of continued work in load testing and complete integration. :muscle:

Re-purposing to include go routine leaks.

Olshansk commented 2 months ago

~Closing as memory leaks seem to have subsided (for now) as a result of continued work in load testing and complete integration.~ 💪

Re-purposing to include go routine leaks.

@bryanchriswhite Sgtm, but for future go-leaks, please create new tickets. I anticipate this won't be the last one.

Also, smaller PRs.