rabbitmq统计插件缓存释放工具

描述

        由于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"

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章