Open deepak-agendaboa opened 9 months ago
Can anyone help?
can i work on this?
It seems that my problem is related to this https://stackoverflow.com/questions/63064393/getting-axios-error-connect-etimedout-when-making-high-volume-of-calls
const axios = require('axios').default; const http = require('http'); const https = require('https');
const instance = axios.create({ baseURL: HOST, auth: AUTH, httpAgent: new http.Agent({ keepAlive: true }), httpsAgent: new https.Agent({ keepAlive: true }), });
instance.put() .then((response) => { console.log(response.data); }) .catch((error) => { console.error(error); }); check out this code
By adding the keepAlive: true
and timeout: 120000
has reduced the errors but still the issue exists.
Not sure how to resolve it completely. It's weird that there is no response on this from the Axios team yet.
+1
+1
shared symptoms
Describe the bug
I'm using Axios package for the http requests from my Firebase cloud function. I have a cloud function which index the data in AWS openSearch. It uses the PUT request. This cloud function has timeout of 2 mins.
Sometimes http requests are failed with error
connect ETIMEDOUT <ip>
Earlier I was thinking that the error is from the openSearch side. So I contacted AWS support. They identified that these requests are not reaching the openSearch endpoint. The timeout error is from the client side itself.
I'm not sure why the request is not able to connect with openSearch endpoint and ends with timeout error. What is the reason and how it can be fixed?
To Reproduce
No response
Code snippet
This is how I use the Axios instance.
Expected behavior
No response
Axios Version
1.2.2
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
Node 16
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response