504 Gateway Time-out docker server

hope you all having good time . but for me is not and i need your help
when i try to generate a pdf on “print_format.download_pdf” i got 504 Gateway Time-out on server that run docker container but at first work fine then after 2 days i got that error even in a simple standar fomart .
thx for helping

it’s been fixed by doing those command
bench config http_timeout 6000
bench setup supervisor
bench setup nginx
sudo supervisorctl reload
sudo service nginx reload
thank you