Connect ETIMEDOUT error ?
I have a recurring problem and I do not understand where it comes from...
After 1200/1300 different API calls, I often get an error "connect ETIMEDOUT"...
Each endpoint uses an authentication and I am in place "Scale x1".
What could be the cause of this?
Comments
-
Are you seeing that error in Xano or is it your front-end refusing to connect to Xano? (Or is this a background processs and not about frontend/backend at all?)
-
Both, but more often on the Front side. Do you know if there is a limit to the number of API requests per hour in Scale x1?
-
There is no rate limiting on the Scale plan, so any timeout errors you find could be attributed to an external API request not completing in the specified timeout duration or due to maxing out instance resources.
-
How long do your API calls typically take to return? under a second? Over 10s? Do some endpoints take a lot longer than others? (maybe those that have a dependency on an external API call?)
-
Hi ,
ok, but what is the limits of instance resources ?
Indeed, I had the feeling that the cache/memory was saturated on the Xano side. We had a migration to do recently to send data to Xano and every 1500 requests or so, a "connect ETIMEDOUT" was coming.
After that, we did some load tests (like simple newletter record) and beyond 15 requests per second, the instance shows signs of fatigue.
We are currently studying all our logics to optimize as much as possible -
Hi ,
less than a second, I sequenced by putting 500ms between each call to relieve the server.
I have to specify that I used n8n on a dedicated server to iterate on the data and coordinate the calls to Xano. -
Ah! Are you using this for some kind of data ingress? Like each request adds a new record to the database, something like that? And if I'm way off track, can you set me straight? More context might help me see through to the bottleneck and maybe that leads to recommendations.
-
,
indeed, new record and update the record. We have a lot of records can be updated by different sources (like webhook for example) -
Are these large tables? Are there multiple indexes on them? Add-or-update is actually kind of expensive because it puts a high-integrity read in front of the write action. If you know, for example, that this is an add vs an update, you can save yourself pain.
Another thought: since you are on scale, you also have the option of using Redis to cache new answers pretty darn fast and add them to the database in a batch process that could run pretty frequently. This ersatz queuing process creates eventual consistency while preventing your database from being a bottleneck. -
Hi ,
Yes, we have several thousand entries and regular additions or updates. An entry can contain up to 50 fields.
We also use Redis for heavy queries, however, I wonder if it would be relevant to cache after each new entry or update of a cached entry, it could represent a lot of data... do you know what is the max capacity of cache with Redis? -
Hi, was this issue resolved? We're seeing similar issues on our scale1x instance. Any help around how to solve this is truly appreciated.
We have a firebase tasks queue that sends out a batch of requests (sequentially 1 per second and 1 active task) over 30 minutes or so. It's a batch process that needs to run each night. The response time in all cases is <500 ms so it doesn't seem to be server load causing this. The API doesn't call any external APIs.
Our Google Cloud instance is in the same region as Xano. Do we need a VPN or something?
-
Hi, our issue was on the firebase side. We had a serverless vpc connector and were directing all traffic through a static ip associated with the vpc connector. We removed that and the issue got resolved.
If you have any other subsystem or micro service environment talking to Xano, it might help to test the Xano APIs directly from a local client first. That will help isolate the problem.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback