Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: socket hang up #594

Closed
iraycd opened this issue Jan 23, 2019 · 5 comments
Closed

Error: socket hang up #594

iraycd opened this issue Jan 23, 2019 · 5 comments

Comments

@iraycd
Copy link

iraycd commented Jan 23, 2019

(node:9190) UnhandledPromiseRejectionWarning: Error: socket hang up
    at createHangUpError (_http_client.js:313:15)
    at Socket.socketCloseListener (_http_client.js:354:25)
    at Socket.emit (events.js:187:15)
    at TCP._handle.close [as _onclose] (net.js:596:12)
(node:9190) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9190) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@Simran-B
Copy link
Contributor

@iraycd Can you also post some information about your environment, the driver and ArangoDB version, and what code caused this? Thanks.

@iraycd
Copy link
Author

iraycd commented Jan 23, 2019

Latest docker image and latest arangojs.
Node is running in

FROM node:lts-alpine

https://github.com/arangodb/arangodb-docker/blob/c98889cf79d8cdeaf56cdedb0c8748ca434f1094/alpine/3.4.1/Dockerfile

First observed it while creating and dropping multiple databases at time.

But, not I see it happening for many queries.

@iraycd
Copy link
Author

iraycd commented Jan 24, 2019

request/request#2047
https://github.com/firebase/firebase-tools/pull/1096/files

  options.headers = options.headers || {};
  options.headers["connection"] = "keep-alive";

I guess this might help. Thank you.

@pluma
Copy link
Contributor

pluma commented Jan 24, 2019

That seems unlikely unless something changed in Node. Arangojs already uses keep-alive by default. I'd have to investigate this. Can you check a more recent version of Node than LTS? An unhandled rejection should cause an uncaught error in newer versions, so this would not only log the warning but actually kill the container.

Sadly the stack trace doesn't really provide a lot of information. You might want to try installing this library and importing it at some point in your code: https://www.npmjs.com/package/asynctrace That might provide more detailed stacktraces that could help figuring out what's going on.

@iraycd
Copy link
Author

iraycd commented Jan 30, 2019

Sorry, I am not sure how to do it JEST, I am using JEST for testing.
I don't know how to exactly how to get it a better stack trace. I have tried.

jestjs/jest#5104

I am using https://github.com/roboncode/orango/ to connect and disconnect.

@iraycd iraycd closed this as completed Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants