In my company website, we allow users to upload orders by uploading an excel file. When this file is uploaded, the details are read, all the required orders are created and then a coloumn, with the required order ids is added to the users file and sent back to them.
The problem I am facing is a 504 Gateway timeout. I am not able to diagnose what exactly is causing the timeout.
We have a HA_PROXY load balancer and application servers using PHP.
How should I detect what is causing the timeout issue? Is it HA_PROXY, apache or the users browser?
PS: The return file to be sent to the user exists in the temp directory of PHP in the server but because the connection has timed out is not sent back to the user.