描述
由于rabbitmq的负载过高,经常会出现警告:The management statistics database currently has a queue of XXXX events to process. If this number keeps increasing, so will the memory used by the management plugin. You may find it useful to set the rates_mode config item to none.
解决方案
设置每1分钟统计一次
rabbitmqctl eval 'application:set_env(rabbit, collect_statistics_interval, 60000).'
编写脚本,通过crontab每15分钟执行脚本清空统计插件的缓存
source /etc/profile
echo "start-rabbitmq-resart"
rabbitmqctl eval 'exit(erlang:whereis(rabbit_mgmt_db), please_terminate).'
echo "finish-rabbitmq-resart"