Downloading Diag file

While downloading Diag file we are facing error 504 Gateway Time out

Suspect the device is busy when you try to download the Diagnostic Report. By the way, may I know which model and firmware version you are using?