Metabase starts to throw 502 without any reason

So, we have come across a situation where the metabase starts to throw 502 randomly until we restart/reboot the instance even when the health of the application shows OK. Please help.