Skip to main content

REST API returns a timeout, is the background process still running or does the request need to be retried?

REST API returns 504 - Will the previous (still running) process in ABRA Flexi be interrupted? Will there be a transaction conflict?

Written by Petr Pech

A long-running request can end with a 504 response — the proxy in front of ABRA Flexi stopped waiting. However, this does not interrupt background processing, which will run to completion.


What to do

  • Wait for the process to finish, and only then verify the result by querying the data.

  • Don't send the request again right away. A repeated call will get stuck on locks held by the still-running first process — instead of speeding things up, the two calls will block each other.

  • Verify the result based on the data, not the return code. For imports, it's useful to have your own identifier so you can tell whether the record was created.

⚠️ A 504 response doesn't mean the operation failed — only that it took longer than the proxy was willing to wait. This is fundamentally different from 503, where the request never even reached the core; that case is described in the article Error 503 Service Unavailable.


How to avoid timeouts

  • Split the batch into smaller parts. Importing in batches of hundreds of records is more reliable than a single request with tens of thousands.

  • Limit the scope of reads — use detail=custom instead of detail=full, and a filter instead of downloading the entire record set.

  • Avoid concurrency — two batches operating on the same documents will block each other.

💡 If timeouts keep occurring even with small requests, it's more likely a performance issue with the instance — contact support so they can check the server's operation.


Related

Did this answer your question?