Skip to content

Commit e60c7df

Browse files
Merge pull request #11589 from rabbitmq/mergify/bp/v3.13.x/pr-11587
Add logging for when hitting vhost_max and component limits (backport #11587)
2 parents c6ea716 + 8de19e0 commit e60c7df

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

deps/rabbit/src/rabbit_runtime_parameters.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ is_within_limit(Component) ->
165165
Limit = proplists:get_value(Component, Limits, -1),
166166
case Limit < 0 orelse count_component(Component) < Limit of
167167
true -> ok;
168-
false -> {errors, [{"component ~ts is limited to ~tp per node", [Component, Limit]}]}
168+
false ->
169+
ErrorMsg = "Limit reached: component ~ts is limited to ~tp per node",
170+
ErrorArgs = [Component, Limit],
171+
rabbit_log:error(ErrorMsg, ErrorArgs),
172+
{errors, [{"component ~ts is limited to ~tp per node", [Component, Limit]}]}
169173
end.
170174

171175
count_component(Component) -> length(list_component(Component)).

deps/rabbit/src/rabbit_vhost.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ is_over_vhost_limit(Name, Limit) when is_integer(Limit) ->
377377
ErrorMsg = rabbit_misc:format("cannot create vhost '~ts': "
378378
"vhost limit of ~tp is reached",
379379
[Name, Limit]),
380+
rabbit_log:error(ErrorMsg),
380381
exit({vhost_limit_exceeded, ErrorMsg})
381382
end.
382383

0 commit comments

Comments
 (0)