504 Gateway Time-out The server didn't respond in time. How to fix it?
The servlet was taking a long time to compress the log files, and Apache's timeout was set to 2min.
The error was fixed by increasing the TimeOut Directive on the httpd.conf file:
#
# Timeout: The number of seconds before receives and sends time out.
#
##Timeout 120
Timeout 600