Skip to content

paratii-db looses web socket connection #155

@jellegerbrandy

Description

@jellegerbrandy

We have had now two episodes in which the database does not receive the LogCreateVideo event.

This may be the fact that the db "looses" the websocket connection. If that is the case, we need some way to recover from that error automatically.

(I.e. we need to handle errors like this instead of just logging them:

You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
Error: connection not open
    at WebsocketProvider.send (/home/paratii/paratii-db/node_modules/web3-providers-ws/src/index.js:219:18)
    at Timeout._onTimeout (/home/paratii/paratii-db/node_modules/web3-providers-ws/src/index.js:204:19)
    at ontimeout (timers.js:458:11)
    at tryOnTimeout (timers.js:296:5)
    at Timer.listOnTimeout (timers.js:259:5)
(node:19673) UnhandledPromiseRejectionWarning: Error: connection not open
    at WebsocketProvider.send (/home/paratii/paratii-db/node_modules/web3-providers-ws/src/index.js:219:18)
    at Timeout._onTimeout (/home/paratii/paratii-db/node_modules/web3-providers-ws/src/index.js:204:19)
    at ontimeout (timers.js:458:11)
    at tryOnTimeout (timers.js:296:5)
    at Timer.listOnTimeout (timers.js:259:5)
(node:19673) 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: 2)

the error log on production (/home/paratii/.pm2/logs/paratii-db-error-0.log

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions