Zend certified PHP/Magento developer

Magento 2 504 Time Out Gateway

I have a Magento site, running on the Apache. Sometimes it gives us the 504 Time Out Gateway.

Steps I performed till now :

  • increased the time out related in the php.ini

What will be the reason, If anyone has faced this issue or helped me regarding this would be appreciated.