504 Gateway Time-out - nginx/1.6.2

Hello,
I got this error on snapshot or backups creating on some sites.
Attached screenshot with the error.
Thanks,
Amir