EMQ 问答社区

maximum heap size reached

问题描述

4000个客户端每秒发送1条消息,( 4000/s 消息),消息报文大小500字符不到。4个消费者mqttclient 通过共享订阅方式消费数据。一段时间后emqx 日志就出现一些异常。

环境信息

  • EMQ X 版本:4.2.9
  • 操作系统及版本:ubuntu20.04
  • 其他

详细日志

2021-04-07 09:05:34.661 [error]      Process:          <0.15995.0> on node 'emqx@10.10.38.112'
     Context:          maximum heap size reached
     Max Heap Size:    8388608
     Total Heap Size:  22671282
     Kill:             false
     Error Logger:     true
     GC Info:          [{old_heap_block_size,8912793},
                        {heap_block_size,13211016},
                        {mbuf_size,547473},
                        {recent_size,747483},
                        {stack_size,178},
                        {old_heap_size,3840272},
                        {heap_size,4210147},
                        {bin_vheap_size,1368235},
                        {bin_vheap_block_size,1618340},
                        {bin_old_vheap_size,3094666},
                        {bin_old_vheap_block_size,1347604}] 

2021-04-07 09:05:38.997 [error]      Process:          <0.15995.0> on node 'emqx@10.10.38.112'
     Context:          maximum heap size reached
     Max Heap Size:    8388608
     Total Heap Size:  32796613
     Kill:             false
     Error Logger:     true
     GC Info:          [{old_heap_block_size,12834421},
                        {heap_block_size,19608144},
                        {mbuf_size,445095},
                        {recent_size,5604757},
                        {stack_size,23},
                        {old_heap_size,0},
                        {heap_size,8821746},
                        {bin_vheap_size,5015486},
                        {bin_vheap_block_size,6854964},
                        {bin_old_vheap_size,0},
                        {bin_old_vheap_block_size,2180423}]

相关截图

你的4个共享的客户端消费不过来了…造成消息堆积了 想想办法提高下消费的速度呢?

消费端bug fix以后情况的确有改善了。 :grinning:

1赞