jbmusso / gremlin-javascript

JavaScript tools for graph processing in Node.js and the browser inspired by the Apache TinkerPop API
MIT License
214 stars 63 forks source link

Janusgraph Server connection intermittently throws error: not opened at WebSocket.send #95

Closed phani1kumar closed 6 years ago

phani1kumar commented 6 years ago

Getting 'not opened at WebSocket.send' intermittently (say, when the client.execute function gets fired with around 5 minutes gap). Catching this exception and re-inspection the execute method is resulting in timeout error!

I've a firebase cloud function, that gets triggered on some user actions. So, some user actions are failing while others are being successful.

Added a heartbeat query as a discarded promise, but no much use.

Error: not opened at WebSocket.send (/user_code/node_modules/gremlin/node_modules/ws/lib/WebSocket.js:357:18) at WebSocketGremlinConnection.sendMessage (/user_code/node_modules/gremlin/lib/WebSocketGremlinConnection.js:54:13) at GremlinClient.sendMessage (/user_code/node_modules/gremlin/lib/GremlinClient.js:300:21) at GremlinClient.sendCommand (/user_code/node_modules/gremlin/lib/GremlinClient.js:406:12) at GremlinClient.messageStream (/user_code/node_modules/gremlin/lib/GremlinClient.js:389:10) at GremlinClient.execute (/user_code/node_modules/gremlin/lib/GremlinClient.js:326:32) at e (/user_code/index.js:45:14) at GremlinClient.executeGraph (/user_code/index.js:43:10) at processUpdateQuery (/user_code/lib/userprofile.js:227:17) at e (/user_code/lib/userprofile.js:187:15)

jbmusso commented 6 years ago

Are you positive the remote cluster is up and running? Closing this since it's a bit old, will re-open if further investigation is needed.