Skip to content

Commit ddbe974

Browse files
author
Loïc Hoguin
committed
Fix memory_breakdown for connection procs
Instead of trying to read the ranch_server ETS table directly, use an internal Ranch function that does the same. While neither are documented, the latter is less likely to change.
1 parent 40d2b4b commit ddbe974

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

deps/rabbit/src/rabbit_vm.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ conn_sups() ->
231231

232232
ranch_server_sups() ->
233233
try
234-
ets:match(ranch_server, {{conns_sup, '_'}, '$1'})
234+
[Pid || {_, _, Pid} <- ranch_server:get_connections_sups()]
235235
catch
236236
%% Ranch ETS table doesn't exist yet
237237
error:badarg -> []

release-notes/3.9.8.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Contributors are encouraged to update them together with their changes. This hel
2525

2626
GitHub issue: [#3445](https://github.com/rabbitmq/rabbitmq-server/issues/3560)
2727

28+
* `rabbitmq-diagnostics memory_breakdown` failed to read memory of connection
29+
reader, writer and channel processes.
30+
31+
GitHub issue: [#3445](https://github.com/rabbitmq/rabbitmq-server/issues/3560)
2832

2933
## Dependency Upgrades
3034

0 commit comments

Comments
 (0)