Failed to publish events: connect: connection refused

Hi Experts,

I am using beats->logstash->elasticsearch-kibana stack.
Every now and then my file beat will log error log then no other logging at all

2022-07-16T10:04:26.148Z ERROR [publisher_pipeline_output] pipeline/output.go:180 failed to publish events: dial tcp 10.xx.xx.x:5000: connect: connection refused
2022-07-16T10:04:40.940Z ERROR [publisher_pipeline_output] pipeline/output.go:180 failed to publish events: dial tcp 10.xx.xx.x:5000: connect: connection refused

Is that because my logstash is overloaded or shall I restart my filebeat? I need some help to get the best practise here.

This is my production env by the way.
filebeat:
version: 7.16.2
resources:
limits:
cpu: "250m"
memory: "300Mi"
requests:
cpu: "250m"
memory: "300Mi"

Can you check with telnet if logstash is accessible from that host?

Thanks. I actually do not know I could do that from logstash container, so it is to rule out the network layer issue right

I do not have telnet installed on the image but I am sure the network is fine since after restarting the filebeat the log will be able to sent to logstash