- Version: Node.js 8.4.0
- Platform: Heroku
- Subsystem: Cedar-16 stack
I don't see this too often but once in a while it is showing up in my logs without a trace back to anything in my code. Below is a full class definition for a very basic http2-client library that I'm using to connect to Apple's HTTP/2 Push Notification API.
app/web.1: error: Error [ERR_HTTP2_INVALID_SESSION]: The session has been destroyed
app/web.1: at ClientHttp2Session.shutdown (internal/http2/core.js:994:13)
app/web.1: at ClientHttp2Session.emitGoaway (internal/http2/core.js:377:10)
app/web.1: at _combinedTickCallback (internal/process/next_tick.js:131:7)
app/web.1: at process._tickDomainCallback (internal/process/next_tick.js:218:9)
app/web.1: worker 1 disconnected. suicide false
A couple things I could be doing incorrectly:
- I am only
connecting once and holding onto returned client for subsequent requests
- I clean up the client only if
.destroyed !== true or I receive a GOAWAY frame
- I am setting up a request timeout but not a session timeout (didn't see docs for session timeout?)
Code:
https://github.com/AndrewBarba/apns2/blob/node/http2/lib/http2-client.js
I don't see this too often but once in a while it is showing up in my logs without a trace back to anything in my code. Below is a full class definition for a very basic http2-client library that I'm using to connect to Apple's HTTP/2 Push Notification API.
app/web.1: error: Error [ERR_HTTP2_INVALID_SESSION]: The session has been destroyed app/web.1: at ClientHttp2Session.shutdown (internal/http2/core.js:994:13) app/web.1: at ClientHttp2Session.emitGoaway (internal/http2/core.js:377:10) app/web.1: at _combinedTickCallback (internal/process/next_tick.js:131:7) app/web.1: at process._tickDomainCallback (internal/process/next_tick.js:218:9) app/web.1: worker 1 disconnected. suicide falseA couple things I could be doing incorrectly:
connecting once and holding onto returned client for subsequent requests.destroyed !== trueor I receive aGOAWAYframeCode:
https://github.com/AndrewBarba/apns2/blob/node/http2/lib/http2-client.js