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"

 

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