502 Bad Gateway

Connection between users & Kibana is done thru ALB. ALB has target group with just one kibana instance defined. Traffic towards ALB goes thru HTTPS (with legit certificate taken from ACM) and later on traffic is passed using unencrypted connection towards Kibana port 5601. On target group cloudwatch we see 0 responses with 50x error code. On ALB we see a lot of 50x responses and target is marked as fully healthy. From AWS we got information that Kibana might close the connection with TCP RST during the request from ALB and this is the reason of the 50x response. Kibana logs nothing on this (not even in debug messages). Errors are fully random and cannot be simply replicated. Time to get 50x is around 100-200ms so it's for sure not timeout.

What can be the reason to that? How to debug it further?