Chart of Accounts giving Gateway Time-out. How to solve it?

Hi all,
I am on
ERPNext: v12.18.0 (version-12)
Frappe Framework: v12.15.0 (version-12)

And when loading a customer with a Chart of Accounts with 560 records to show as Tree it returns the below error
/api/method/frappe.desk.treeview.get_all_nodes 504 (Gateway Time-out)

Where should i change to avoid the time-out?