- 浏览: 263914 次
- 性别:
- 来自: 北京
文章分类
最新评论
基于EMQ X发布(publish)较大消息(超1MB)不成功分析处理
******************************************
【环境】 emqx v3.1.0
【场景】
客户端发送消息时,消息大小超过1MB时,connection有成功有失败的,延迟一段时间后,提示NPE错误
参见如下:
Exception in thread "hawtdispatch-DEFAULT-3" java.lang.NullPointerException
at org.fusesource.mqtt.client.CallbackConnection$7.run(CallbackConnection.java:450)
at org.fusesource.hawtdispatch.transport.HeartBeatMonitor$3.run(HeartBeatMonitor.java:87)
at org.fusesource.hawtdispatch.transport.HeartBeatMonitor$1.run(HeartBeatMonitor.java:65)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:35)
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:25)
at org.fusesource.hawtdispatch.util.ThreadLocalPool.checkout(ThreadLocalPool.java:78)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.allocateNextWriteBuffer(AbstractProtocolCodec.java:153)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:137)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:389)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:320)
at org.fusesource.mqtt.client.CallbackConnection$5.onTransportConnected(CallbackConnection.java:296)
at org.fusesource.hawtdispatch.transport.TcpTransport.onConnected(TcpTransport.java:605)
at org.fusesource.hawtdispatch.transport.TcpTransport$2$1$1.run(TcpTransport.java:494)
at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:35)
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:25)
at org.fusesource.hawtdispatch.util.ThreadLocalPool.checkout(ThreadLocalPool.java:78)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.allocateNextWriteBuffer(AbstractProtocolCodec.java:153)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:137)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:389)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:320)
at org.fusesource.mqtt.client.CallbackConnection$5.onTransportConnected(CallbackConnection.java:296)
at org.fusesource.hawtdispatch.transport.TcpTransport.onConnected(TcpTransport.java:605)
at org.fusesource.hawtdispatch.transport.TcpTransport$2$1$1.run(TcpTransport.java:494)
at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:35)
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:25)
at org.fusesource.hawtdispatch.util.ThreadLocalPool.checkout(ThreadLocalPool.java:78)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.allocateNextWriteBuffer(AbstractProtocolCodec.java:153)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:137)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:389)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:320)
at org.fusesource.mqtt.client.CallbackConnection$5.onTransportConnected(CallbackConnection.java:296)
at org.fusesource.hawtdispatch.transport.TcpTransport.onConnected(TcpTransport.java:605)
at org.fusesource.hawtdispatch.transport.TcpTransport$2$1$1.run(TcpTransport.java:494)
at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:35)
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:25)
at org.fusesource.hawtdispatch.util.ThreadLocalPool.checkout(ThreadLocalPool.java:78)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.allocateNextWriteBuffer(AbstractProtocolCodec.java:153)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:137)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:389)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:320)
at org.fusesource.mqtt.client.CallbackConnection$5.onTransportConnected(CallbackConnection.java:296)
at org.fusesource.hawtdispatch.transport.TcpTransport.onConnected(TcpTransport.java:605)
at org.fusesource.hawtdispatch.transport.TcpTransport$2$1$1.run(TcpTransport.java:494)
at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch timer" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-1" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-4" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" Exception in thread "hawtdispatch-DEFAULT-2" Exception in thread "hawtdispatch-DEFAULT-2" Exception in thread "hawtdispatch-DEFAULT-3" java.lang.OutOfMemoryError: Java heap space
【分析】 jmap -heap <pid> 监控发现heap老代不断攀升,最终出现OOM(Heap)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 234356736 (223.5MB)
used = 234241664 (223.3902587890625MB)
free = 115072 (0.1097412109375MB)
99.95089878705257% used
From Space:
capacity = 234356736 (223.5MB)
used = 27263184 (26.000198364257812MB)
free = 207093552 (197.4998016357422MB)
11.633198373269714% used
To Space:
capacity = 234356736 (223.5MB)
used = 0 (0.0MB)
free = 234356736 (223.5MB)
0.0% used
PS Old Generation
capacity = 1406664704 (1341.5MB)
used = 1406251136 (1341.1055908203125MB)
free = 413568 (0.3944091796875MB)
99.9705993902581% used
3391 interned Strings occupying 287112 bytes.
****************************************
查看subscriber端,没有消息收到,切换消息(256KB)发布是ok的,考虑EMQ X端参数限制问题
****************************************
【解决】
查看EMQ X配置,注意EMQ X按zone区分,内部和外部交互,此场景数据客户端与EMQ X交互,走external通道
因此查看exernal对消息package大小的限制,默认是1MB的,如果要发送更大消息,将此参数【zone.external.max_packet_size】调大即可。
vim <emqx_home>/etc/emqx.conf
注意以下参数不用调:
********************************************
【环境】 emqx v3.1.0
【场景】
客户端发送消息时,消息大小超过1MB时,connection有成功有失败的,延迟一段时间后,提示NPE错误
参见如下:
Exception in thread "hawtdispatch-DEFAULT-3" java.lang.NullPointerException
at org.fusesource.mqtt.client.CallbackConnection$7.run(CallbackConnection.java:450)
at org.fusesource.hawtdispatch.transport.HeartBeatMonitor$3.run(HeartBeatMonitor.java:87)
at org.fusesource.hawtdispatch.transport.HeartBeatMonitor$1.run(HeartBeatMonitor.java:65)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:35)
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:25)
at org.fusesource.hawtdispatch.util.ThreadLocalPool.checkout(ThreadLocalPool.java:78)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.allocateNextWriteBuffer(AbstractProtocolCodec.java:153)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:137)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:389)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:320)
at org.fusesource.mqtt.client.CallbackConnection$5.onTransportConnected(CallbackConnection.java:296)
at org.fusesource.hawtdispatch.transport.TcpTransport.onConnected(TcpTransport.java:605)
at org.fusesource.hawtdispatch.transport.TcpTransport$2$1$1.run(TcpTransport.java:494)
at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:35)
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:25)
at org.fusesource.hawtdispatch.util.ThreadLocalPool.checkout(ThreadLocalPool.java:78)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.allocateNextWriteBuffer(AbstractProtocolCodec.java:153)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:137)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:389)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:320)
at org.fusesource.mqtt.client.CallbackConnection$5.onTransportConnected(CallbackConnection.java:296)
at org.fusesource.hawtdispatch.transport.TcpTransport.onConnected(TcpTransport.java:605)
at org.fusesource.hawtdispatch.transport.TcpTransport$2$1$1.run(TcpTransport.java:494)
at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:35)
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:25)
at org.fusesource.hawtdispatch.util.ThreadLocalPool.checkout(ThreadLocalPool.java:78)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.allocateNextWriteBuffer(AbstractProtocolCodec.java:153)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:137)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:389)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:320)
at org.fusesource.mqtt.client.CallbackConnection$5.onTransportConnected(CallbackConnection.java:296)
at org.fusesource.hawtdispatch.transport.TcpTransport.onConnected(TcpTransport.java:605)
at org.fusesource.hawtdispatch.transport.TcpTransport$2$1$1.run(TcpTransport.java:494)
at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:35)
at org.fusesource.hawtdispatch.util.BufferPool.create(BufferPool.java:25)
at org.fusesource.hawtdispatch.util.ThreadLocalPool.checkout(ThreadLocalPool.java:78)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.allocateNextWriteBuffer(AbstractProtocolCodec.java:153)
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:137)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:389)
at org.fusesource.mqtt.client.CallbackConnection$LoginHandler.onSuccess(CallbackConnection.java:320)
at org.fusesource.mqtt.client.CallbackConnection$5.onTransportConnected(CallbackConnection.java:296)
at org.fusesource.hawtdispatch.transport.TcpTransport.onConnected(TcpTransport.java:605)
at org.fusesource.hawtdispatch.transport.TcpTransport$2$1$1.run(TcpTransport.java:494)
at org.fusesource.hawtdispatch.internal.NioDispatchSource$3.run(NioDispatchSource.java:209)
at org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
at org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch timer" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-1" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-4" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: Java heap space
Exception in thread "hawtdispatch-DEFAULT-2" java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "hawtdispatch-DEFAULT-2" Exception in thread "hawtdispatch-DEFAULT-2" Exception in thread "hawtdispatch-DEFAULT-2" Exception in thread "hawtdispatch-DEFAULT-3" java.lang.OutOfMemoryError: Java heap space
【分析】 jmap -heap <pid> 监控发现heap老代不断攀升,最终出现OOM(Heap)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 234356736 (223.5MB)
used = 234241664 (223.3902587890625MB)
free = 115072 (0.1097412109375MB)
99.95089878705257% used
From Space:
capacity = 234356736 (223.5MB)
used = 27263184 (26.000198364257812MB)
free = 207093552 (197.4998016357422MB)
11.633198373269714% used
To Space:
capacity = 234356736 (223.5MB)
used = 0 (0.0MB)
free = 234356736 (223.5MB)
0.0% used
PS Old Generation
capacity = 1406664704 (1341.5MB)
used = 1406251136 (1341.1055908203125MB)
free = 413568 (0.3944091796875MB)
99.9705993902581% used
3391 interned Strings occupying 287112 bytes.
****************************************
查看subscriber端,没有消息收到,切换消息(256KB)发布是ok的,考虑EMQ X端参数限制问题
****************************************
【解决】
查看EMQ X配置,注意EMQ X按zone区分,内部和外部交互,此场景数据客户端与EMQ X交互,走external通道
因此查看exernal对消息package大小的限制,默认是1MB的,如果要发送更大消息,将此参数【zone.external.max_packet_size】调大即可。
vim <emqx_home>/etc/emqx.conf
## Maximum MQTT packet size allowed. ## ## Value: Bytes ## Default: 1MB # remedied by can_do on 2019-06-28 zone.external.max_packet_size = 2MB
注意以下参数不用调:
## Maximum MQTT packet size allowed. ## ## Value: Bytes ## Default: 1MB # remedied by can_do on 2019-07-01 mqtt.max_packet_size = 1MB
********************************************
相关推荐
EMQ X是基于MQTT协议的开源消息中间件,它是一个高度可扩展、高性能的 MQTT 服务器,被广泛应用于物联网、车联网、工业4.0等场景。 EMQ X作为MQTT消息服务器,具备以下关键特性: 1. **高性能**: EMQ X采用了事件...
这种桥接技术使得 EMQ X 不仅可以作为一个 MQTT 中心,还可以作为一个数据整合平台,能够将来自不同来源的 MQTT 数据流转发到其他系统,如大数据分析平台或流处理管道。 在压缩包的文件名称列表中,只有一个条目 ...
1、大规模可弹性伸缩的云原生分布式物联网 MQTT 消息服务器,高效可靠连接海量物联网设备,高性能实时处理消息与事件流数据,助力构建关键业务的物联网平台与应用。 基于 APL 2.0 开放源码协议 完整 MQTT 3.x 和 5.0...
EMQ X Broker是业界领先的 MQTT 消息服务器,支持大规模设备连接和高并发消息处理。它提供了丰富的特性,如发布/订阅模式、服务质量(QoS)保证、持久化存储、权限控制、插件扩展以及监控和管理界面,适用于各种IoT...
1. **高并发**:EMQ X Broker可以处理大量同时在线的客户端,确保在大规模物联网部署中的稳定运行。这得益于其分布式架构和负载均衡能力,可以在多台服务器上进行横向扩展。 2. **实时性**:MQTT协议的实时性是其一...
规则引擎的使用:EMQX 的规则引擎可以在消息发布或事件触发时将触发规则引擎,满足触发条件的规则将执行各自的 SQL 语句筛选并处理消息和事件的上下文信息。可以点击新建规则,设置消息体内带有 flag=”hello” 属性...
EMQ X 是一款开源的 MQTT (Message Queuing Telemetry Transport) 服务器,专为物联网(IoT)设计,提供高可扩展性和高性能的 MQTT 消息处理能力。这个压缩包 "emqx-windows-4.3.11.zip" 包含了 EMQ X Broker 的 ...
EMQX,全称Erlang MQTT Broker,是一款基于Erlang OTP构建的开源MQTT消息代理,广泛应用于物联网(IoT)环境。MQTT(Message Queuing Telemetry Transport)是一种轻量级的发布/订阅协议,适用于低带宽、高延迟或不...
EMQX,全称为Erlang MQTT Broker,是一款基于Erlang OTP开发的开源MQTT消息代理,专门针对物联网(IoT)设计。这个“emqx-4.4.3-otp24.2.1-windows-amd64.zip”压缩包文件包含了EMQ X Broker的4.4.3版本,适配于运行...
EMQX,全称是Erlang MQTT Broker,是一个基于Erlang/OTP构建的开源物联网 MQTT 消息中间件。MQTT(Message Queuing Telemetry Transport)是一种轻量级的发布/订阅式消息协议,常用于物联网、移动应用、低带宽、高...
EMQX,全称是Erlang MQTT Broker,是一个基于Erlang/OTP构建的开源MQTT消息代理,专门设计用于物联网(IoT)环境。它具有高度可扩展性、高性能和高可靠性,支持大规模设备连接,适用于各种场景,如智能家居、智能...
解压后->dos窗口进入解压目录->emqx start/console启动MQTT服务。 PS D:\Program Files\emqx\bin> .\emqx start D:\Program Files\emqx\bin>set args_file=-args_file "D:\Program Files\emqx\etc\vm.args" D:\...
EMQ X Broker是一款高度可扩展、高性能的 MQTT 消息代理,专为物联网(IoT)设计。在本文中,我们将深入探讨“emqx-5.3.2-windows-amd64”版本,这是一个专为Windows平台上的64位处理器优化的安装包。 **EMQ X Broker...
EMQ X 是一款开源的 MQTT 服务器,专为物联网(IoT)设计,适用于大规模设备连接和消息处理。"emqx-windows-4.2.7.zip" 是 EMQ X Broker 的 Windows 版本,版本号为 4.2.7。这个压缩包包含了在 Windows 操作系统上...
EMQ X是基于MQTT协议的一款开源、高性能、分布式的消息中间件,它专为物联网设计,具有强大的扩展能力和高可用性。EMQ X支持大量的并发连接,可以处理千万级别的设备连接,并且提供了丰富的功能,如权限管理、集群...
EMQX 5.0 单集群支持 MQTT 并发连接数高达 1 亿条,单服务器的传输与处理吞吐量可达每秒百万级 MQTT 消息,并保证延迟在亚毫秒级。 EMQX 支持多种协议,包括 MQTT (3.1、3.1.1 和 5.0)、HTTP、QUIC 和 WebSocket 等...
EMQ X是基于MQTT的开源 MQTT 服务器,设计用于处理大规模并发连接和高吞吐量的场景。本篇文章将详细介绍EMQ X及其在自我搭建中的应用。 **EMQ X 简介** EMQ X Broker是一款高度可扩展、高性能的 MQTT 消息代理,它...
EMQ X Broker是一款开源的、高度可扩展的 MQTT 消息代理,专为物联网(IoT)设计,支持大规模设备连接和消息处理。 描述中提到了几个关键步骤来部署和管理这个服务: 1. **解压文件**:首先,你需要将下载的 ZIP ...
emqx的如下版本emqx-windows-4.2.5.zip emqx的如下版本emqx-windows-4.2.5.zipemqx的如下版本emqx-windows-4.2.5.zipemqx的如下版本emqx-windows-4.2.5.zip
1.解压 ,配置emqx_auth_redis.conf中redis连接地址 2.进入解压目录,执行docker build . 得到镜像 3.执行 docker run --name emqx -p 1883:1883 -p 8883:8883 -p 18083:18083 -d 镜像id 服务启动成功。