given code using request (2.21.0 and node 10.12) to handle streaming data like this: (note timeout:10000)
it handles millions of data events daily, no problem!!! and when there's a 10 sec pause on any of the streams, it reissues the request... been working great for months... thanks for the great module!!!
however every now and then (has happened about 4 times in the last month) all the streams (all started with child_process.fork) just stop and hang (forever) with no errors anywhere that i can find... and timeout does not re drive the request
did verify with the endpoint server people that yes, they were rebooting their streaming server about the time of one of the hangs
so any advice on this occasional "timeout not working" issue?
my guess is i need to handle some event that i'm not handling... close? end? zombies?
i was sort of hoping "timeout" would handle all of them... that would be nice...
in testing... my problem is that when request timeout returns, i need to setTimeout and restart my function.. as always
but when timeout returns in testing, it events all of "end", "close" and "error" - and if i drive setTimeout with any/all of them, I get the requests backed up ... until it gets to 99%, wups
so in end, close and error, i only need to setTimeout to restart my function when the timeout return has NOT already been driven... but how do i do that?
is that clear? it's not to me...
end, close and error all have different cb code, but just logging for right now... request timeout cb has the setTimeout to start the function over
but if i have timeout, end, close and error all call the same cb, still same issue... standard run of the mill timeout at 10 secs calls timeout, then end, close and error as well... assumption is that once in a blue moon where timeout doesn't run, then end, close or error will, but how do i know the difference?
again, all i did was add 3 separate listeners but now when the normal timeouts occur (happens all the time) i get timeout, end, close and error all run... and i only need to run setTimeout to start the function again on the request timeout only OR when it hasn't already been run
code like this:
if this makes no sense, blame it on my 2nd grade js level :-)
Is this still an issue?
This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open.