What does the error 504 Gateway Timeout (time out)?
Error 504 Gateway Timeout (time out) is one of the most common. What is 504 Gateway Timeout (time out)? Usually, this kind of error can occur if the server that is a web resource that sends a huge number of requests, and he just does not have time to handle them, then he has not obtained within the prescribed time limit to return an HTTP response. As a result, may even break the connection, and the user will not have access to the web resource. This is because the server is not time to process the oldest requests, which have accumulated for many, but there are also new ones that stand in line and do not have time to be processed.
How to fix error 504 Gateway Timeout (time out)?
The problem may be in the script, which fails to cope with the task in the allotted time. In most cases this happens when a script accesses third-party sites. In order to solve such a problem, it is enough to increase the value of PHP setting max_execution_time. If the problem is not resolved, then you have any way to optimize the script so that he could complete tasks within a set time.
To cope with the immediate problem can only be a server administrator, which should increase its performance in several times. To implement his plan only if you increase the amount of computer memory and change the processor for more powerful. In addition, you will need to increase the number of httpd processes directly in Apache. Can happen is that the site does have to "move" to another hosting. Such a need arises only in the case if the site will be located on a normal virtual hosting, an administrator which is either not responding, or refuse help or if he fails to solve this problem.
There is another solution that might appeal to most users. This option involves optimization of the site itself. That is, the site administrator will need to optimize the scripts, SQL queries and more in order to be able to run for less time.