I receive a Gateway Timeout when I try to print out a pdf on sales invoice

Hello all,
Please I need support on how I may resolve a problem which I am encountering when trying to print out a sales invoice.

Each time I try to print out a sales invoice on pdf format, I get a gateway timeout. From my own end, I have increased the http_timeout and the proxy_timeout (I think that’s what they call it), non of this attempts have been to able to solve this problem. My erpnext version is v10.1.45 (master), and my frappe framework version is v10.1.44 (master).

I will be grateful if someone can render me assistance or suggestions in resolving this problem.
Thank you very much.

Perhaps this is the issue