Closed RealYukiSan closed 3 months ago
You must set request timeout bigger than timeout
parameter of the request.
The situation remains unchanged even when I change the timeout value:
const param = `timeout=150&offset=${last_update}`;
const response = await fetch(`${process.env.BASE_URL}/getUpdates?${param}`, { keepalive: true, signal: AbortSignal.timeout(1000 * 200) }).then(res => res.json())
Check how much time has passed between request start and response. If it is 200+ seconds, then there were a network issue, which is normal.
thanks for the help!
I've test my internet connectivity by running this command:
and I not see timeout using curl, but when it uses fetch, sometimes timeout arises, how to fix the timeout problem in fetch nodejs? I also tried fetch with keepAlive and timeout but not work: