-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
I've been using node-fetch with different proxies and https-proxy-agent for years. Never had a problem. I switched to another proxy service and every 50 requests or so, the node.js process exits without warning. I know it's the proxy because if I switch to a different proxy it works perfectly.
How can I debug this issue if it just exits without warning and I don't have access to the logs of the proxy service?
This is the code I'm using for testing:
let counter = 1
while (true) {
const agent = new HttpsProxyAgent(proxyUri)
try {
const html = await fetch(
`https://www.google.com`,
{headers: {'User-Agent': userAgent}, agent, timeout: 5000}
).then(res => res.text())
}
catch (e) {
console.log(e.message)
}
console.log(counter++)
}It always exits without warning between 30-50 iterations with that proxy
Reactions are currently unavailable