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

Unhandled rejection StatusCodeError: 504 - "Endpoint request timed out" #154

Closed
jameswilsterman opened this issue Sep 15, 2016 · 4 comments

Comments

@jameswilsterman
Copy link

jameswilsterman commented Sep 15, 2016

I've started seeing this error fairly reliably. It seems to happen when I send lots of requests in a row within a short time frame. Any thoughts?

Unhandled rejection StatusCodeError: 504 - {"message":"Endpoint request timed out"}
at new StatusCodeError (/app/node_modules/request-promise/lib/errors.js:32:15)
at Request.RP$callback as _callback
at Request.self.callback (/app/node_modules/request/request.js:200:22)
at emitTwo (events.js:100:13)
at Request.emit (events.js:185:7)
at Request. (/app/node_modules/request/request.js:1067:10)
at emitOne (events.js:95:20)
at Request.emit (events.js:182:7)
at IncomingMessage. (/app/node_modules/request/request.js:988:12)
at emitNone (events.js:85:20)
at IncomingMessage.emit (events.js:179:7)
at endReadableNT (_stream_readable.js:913:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)

@jameswilsterman
Copy link
Author

Also, to be clear, that's colon100colon not the emoji 💯

@analog-nico
Copy link
Member

Well, that is a very low level issue that may even be caused by the endpoint (server) and not your request itself. For some reason your request doesn't complete and you get a 504. This could be either because the server really does not respond because of the high workload and the request times out – see the timeout option – or your node.js isn't configured well – see issue #133 in regard to the pool option.

Although you would rather get an ECONNRESET if the endpoint actually drops the connection, I wouldn't rule that out.

The best next step for you would be to activate the debugging output to get a better picture about what is going on.

@jameswilsterman
Copy link
Author

Thank you for the response and advice. I am looking into the options above.

@analog-nico
Copy link
Member

I hope you found the cause @jameswilsterman . I am closing this issue now but don't hesitate to ping me again.

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

2 participants