apache / openwhisk-client-js

JavaScript client library for the Apache OpenWhisk platform
https://openwhisk.apache.org/
Apache License 2.0
82 stars 53 forks source link

socket hangup issues due to slow connection open #89

Closed starpit closed 6 years ago

starpit commented 6 years ago

we inherit needle's default connection-open timeout of 10 seconds. this seems to result in socket hangup errors. i'm not sure what the right solution is here, but wanted to raise awareness of it.

this seems to happen often enough to be of note, when talking to ibm cloud functions

starpit commented 6 years ago

more info: this is actually an issue with the needle library, in the way it interprets or implements open timeout: https://github.com/tomas/needle/issues/229

jthomas commented 6 years ago

Interesting bug!

Reading the issue you reference, looks like they might resolve the bug in needle soon? If so, this should resolve this issue for us?

starpit commented 6 years ago

the owner of needle has a fix in the works. i've reviewed it, and it seems reasonable. i think it'll address our bug.

epatters commented 6 years ago

Thanks @starpit and others for your responsive handling of this issue. I see that the fix has just been incorporated into the runtime (apache/incubator-openwhisk-runtime-nodejs#18), so hopefully it will hit Bluemix soon.

Incidentally, I now understand why this bug manifested only recently: it coincided with the switch from promise-request to needle in this library (#78), which landed in v3.10.0 (#87).