Uh oh!
There was an error while loading. Please reload this page.
Handle promise rejection to keep container alive - #11162
Conversation
|
| process.on('unhandledRejection', (reason, promise) => { | ||
| logger.error( | ||
| { promise, reason, stack: reason instanceof Error ? reason.stack : null }, |
There was a problem hiding this comment.
Fwiw I think you can pass the reason as the first arg and pino will auto format it as an error if it is one: https://github.com/pinojs/pino/blob/main/docs/api.md#mergingobject-object
[6ce564a] Handle promise rejection to keep container alive (#11162) Isaac Solo [7e0f238] Migrate dn2.monophonic to new architecture (#11176) Raymond Jacobson [0a12eff] [CI] Add missing dep to solana-relay to fix integration workflow (#11168) Marcus Pasell [6f6483f] Explicit match for uptime route, no caching (#11158) endline [0e39f23] [PAY-3832] Move challenge disbursement notif to pre-claim (#11116) Isaac Solo [485d3eb] Add prod backfill for emails (#11141) Farid Salau [583c329] rm index_solana_plays (#11126) alecsavvy [85f202a] Add 'is_initial' to json response (#11132) Farid Salau [5130fd1] prod plays cutover (#11047) alecsavvy [4e99efe] [PAY-3601] Add email backfill for staging env (#11100) Farid Salau [7713a79] Ensure deleted tracks are filtered out of listening history (#11096) Dylan Jeffers [e1930f5] use correct casing for stage em contract (#11114) alecsavvy [9216c98] Move protocol dashboard to packages/*, add earthfast deployment (#11094) Raymond Jacobson [efdaaea] ignore generated code in python lint (#11107) alecsavvy [940925a] Update indexing to support new playlist_contents format (#11091) Randy Schott [266e56b] Add stage one shot handles for QA (#11099) Isaac Solo [5a61d0f] [QA-1925] Fix following query args issue (#11093) JD Francis [c3f8251] Version Packages (#10361) github-actions[bot] [6b97178] Fix openresty upstream path for uptime (#11085) endline [fdeb236] One shot reward UI + notif (#10788) Isaac Solo [fe3981e] MRI: MRVR country fixes (#11072) Steve Perkins [bec2090] Remove `added_timestamps` usage from client (#11080) Randy Schott [5d4ed8f] Flush listen challenges in index_core_plays (#11076) Reed [77020f4] Always include preview url if necessary (even when logged out) (#11068) Marcus Pasell [b97395d] fix should index plays check (#11066) alecsavvy
Description
Uncaught errors are causing solana-relay container to restart, adding unnecessary downtime. The root cause of the error doesn't seem to be anywhere within our code because we're handling exceptions on our end but I suspect it could be an unhandled promise in a background job or another async operation within solana. Either way, we should be robust enough to not let that take down the entire container.
Also adding some more exception handling.
Maybe unhandled promise from: solana-foundation/solana-web3.js#3720
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
Ran on prod and confirmed restarts subsided and this is actually an unhandled promise rejection.