Why have I been intermittently getting 504 gateway timeout errors?

I am facing the same problem with M30 and up

Ap-southeast-1