vacuumlabs / adalite-backend-service

Icarus, a reference implementation for a lightweight wallet developed by the IOHK Engineering Team.
Apache License 2.0
2 stars 7 forks source link

The instance is unhealthy #85

Open atomlab opened 4 years ago

atomlab commented 4 years ago

Hi. We are using adalite https://github.com/vacuumlabs/adalite-backend-service/commit/6f94552c2bf0e72d86d32f618098633231a29d9a branch new-importer.

And last few week we have a problem with errors. Adalite http response code 500.

ERROR: [object Object]/29 on adalite-backend-01: The instance is unhealthy (req.route=/api/addresses/summary/:address, res.status=500, res.time=0)
GET /api/addresses/summary/DdzFFzCqrht3xZvz5aWruXi2cw3WziBvCBRdheC36kCiPe4v28j2p5gqw1x6vjHSfGv7yeSSmY6Tejk3LNSzVDGpB8MXinWoxNE1fjEV HTTP/1.1

What we can do for resolve this problem? What is your opinion about the reason of this problem? Thanks!

Our stack:

refi93 commented 4 years ago

Hi @atomlab - you can get more insight on what is failing by inspecting the endpoint /api/v2/healthStatus which shows you which part of the healthcheck failed (i.e. if it is out of sync or tx submission is failing)

Anyway, it may be related to the issue described in the following PR: https://github.com/vacuumlabs/adalite-backend-service/pull/83 - basically, the tx submission check in the healthcheck seems to overwhelm the cardano-http-bridge with tx submission requests and it may freeze. Perhaps you can try pulling that branch and see if the problem persists

Also, the original reference endpoint to check if the instance is syncing was disabled by IOHK, so it was replaced in that PR (but even if it fails, it should not result in a failure of the healthcheck as there is fallback logic for that)