Jump to content

sales_invoices - TimeoutError - The backend has not responded within 28s while proxying this request


Recommended Posts

Hi, our customer keeps getting this error when posting some big invoices:

…"ResponseCode":"GatewayTimeout","Response":"{\"$severity\":\"error\",\"$dataCode\":\"TimeoutError\",\"$message\":\"The backend has not responded within 28s while proxying this request. Please try again later.\",\"$source\":\"Proxy\"}"}

Every time they try the invoices are created in their Sage account.

How can we solve this issue?

Thanks, Marco

Link to comment
Share on other sites


Thank you for your question. You don't state which Sage product this is in relation to and have posted in the General forum so I will assume you're integration is with Sage Business Cloud Accounting. Please let me know if this is not the case.

Timeouts are due to the number of item_lines being passed.

We have services in the backend which validate the ledger accounts and tax_rate id's passed in each and every item line. It looks as if the backend service cannot process this number of item lines in the 28 seconds before the API Gateway times out.

One option would be to incorporate the use of idempotency and then re-try any failed 504 requests after a number of seconds. I found re-trying after 15 seconds provided me with the 201 created response, but this time will vary depending on the number of item lines and the server load at any specific point in time.


Information, documentation, guides and resources for Sage developers




Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...