Hello Xano Community,
I'm facing an issue with API call timeouts within a background task on Xano. Here’s the setup:
I have a background task that processes a queue stored in our Xano database. This task makes POST requests to a FastAPI endpoint, essentially scheduling API calls. Since these requests can take a while, I’ve set a timeout of 5000 seconds for each API call in the background task.
Currently, the background task is in our test branch, so I’ve been running it manually to troubleshoot before pushing it to live.
The Issue:
For API calls that take under 5-10 minutes, everything works perfectly, and the background task receives the response from the FastAPI endpoint. However, for longer API calls, Xano doesn’t seem to receive the response. The API call just keeps running until it hits the timeout limit, ending with a null response—even though the FastAPI endpoint has already processed the request successfully.
Here’s what I’ve done so far:
Verified Endpoint Functionality: Tested the FastAPI endpoint independently with the same inputs (using
curl
and Postman), and it processes everything correctly.Checked Shorter Requests: API calls under 10 minutes return responses without any issues.
Is there a known limitation with Xano’s handling of long-running API calls within background tasks? Or any recommended practices for managing this kind of timeout issue?
Any insights or advice would be greatly appreciated!
Thanks in advance!