内存过满会导致mqtt发布消息失败吗

环境

  • EMQX 版本:5.3.2
  • 操作系统版本:Ubuntu

部署到系统上之后间隔十几分钟左右mqtt消息不再下发

系统日志:
2024-01-08T10:29:54.841544+08:00 [warning] msg: long_schedule, mfa: emqx_sys_mon:handle_info/2(140), info: [{timeout,244},{in,{emqx_connection,recvloop,2}},{out,{emqx_connection,recvloop,2}}], procinfo: [{pid,<0.19362.2>},{memory,13944},{total_heap_size,1597},{heap_size,610},{stack_size,8},{min_heap_size,233},{proc_lib_initial_call,{emqx_connection,init,[‘Argument__1’,‘Argument__2’,‘Argument__3’,‘Argument__4’]}},{initial_call,{proc_lib,init_p,5}},{current_stacktrace,[{emqx_connection,recvloop,2,[{file,“emqx_connection.erl”},{line,435}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,250}]}]},{registered_name,},{status,waiting},{message_queue_len,0},{group_leader,<0.2497.0>},{priority,normal},{trap_exit,false},{reductions,378617},{last_calls,false},{catchlevel,1},{trace,0},{suspending,},{sequential_trace_token,},{error_handler,error_handler}]
2024-01-08T10:29:57.301179+08:00 [warning] msg: long_schedule, mfa: emqx_sys_mon:handle_info/2(140), info: [{timeout,261},{in,{emqx_connection,recvloop,2}},{out,{emqx_connection,recvloop,2}}], procinfo: [{pid,<0.19882.2>},{memory,10928},{total_heap_size,1220},{heap_size,610},{stack_size,8},{min_heap_size,233},{proc_lib_initial_call,{emqx_connection,init,[‘Argument__1’,‘Argument__2’,‘Argument__3’,‘Argument__4’]}},{initial_call,{proc_lib,init_p,5}},{current_stacktrace,[{emqx_connection,recvloop,2,[{file,“emqx_connection.erl”},{line,435}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,250}]}]},{registered_name,},{status,waiting},{message_queue_len,0},{group_leader,<0.2497.0>},{priority,normal},{trap_exit,false},{reductions,6405},{last_calls,false},{catchlevel,1},{trace,0},{suspending,},{sequential_trace_token,},{error_handler,error_handler}]
2024-01-08T10:41:23.188371+08:00 [warning] msg: long_schedule, mfa: emqx_sys_mon:handle_info/2(140), info: [{timeout,257},{in,undefined},{out,{erpc,mcall_receive_replies,5}}], procinfo: [{pid,<0.20106.2>},{memory,16800},{total_heap_size,1974},{heap_size,1598},{stack_size,58},{min_heap_size,233},{proc_lib_initial_call,{emqx_connection,init,[‘Argument__1’,‘Argument__2’,‘Argument__3’,‘Argument__4’]}},{initial_call,{proc_lib,init_p,5}},{current_stacktrace,[{erpc,call,5,[{file,“erpc.erl”},{line,146}]},{rpc,call,5,[{file,“rpc.erl”},{line,401}]},{emqx_cm,kick_session,3,[{file,“emqx_cm.erl”},{line,487}]},{lists,foreach_1,2,[{file,“lists.erl”},{line,1442}]},{emqx_cm,‘-open_session/3-fun-0-’,5,[{file,“emqx_cm.erl”},{line,271}]},{emqx_cm_locker,trans,3,[{file,“emqx_cm_locker.erl”},{line,51}]},{emqx_channel,process_connect,2,[{file,“emqx_channel.erl”},{line,596}]},{emqx_connection,with_channel,3,[{file,“emqx_connection.erl”},{line,840}]},{emqx_connection,process_msg,2,[{file,“emqx_connection.erl”},{line,493}]},{emqx_connection,process_msg,2,[{file,“emqx_connection.erl”},{line,499}]},{emqx_connection,handle_recv,3,[{file,“emqx_connection.erl”},{line,455}]},{proc_lib,wake_up,3,[{file,“proc_lib.erl”},{line,250}]}]},{registered_name,},{status,waiting},{message_queue_len,0},{group_leader,<0.2497.0>},{priority,normal},{trap_exit,false},{reductions,1260},{last_calls,false},{catchlevel,6},{trace,0},{suspending,},{sequential_trace_token,},{error_handler,error_handler}]

这个是提示cpu 也不够了。
如果 cpu, 内存都不够了,发不了消息,应该是正常现象。
应该先看看怎么解决为什么消息会点满内存,你是只发消息,不消费么?

内存满不是消息的原因,服务器有其他东西占用内存,我平台设置的也是qos为0,保留消息的功能也关了。正常现象的话我就得去考虑减少其余软件的内存占用了。

算是正常现象。

这日志里面没有说你内存不够。应该是 cpu 不够了。