Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stats not ready causes crash it seems #56

Open
robcxyz opened this issue Jan 25, 2025 · 0 comments
Open

stats not ready causes crash it seems #56

robcxyz opened this issue Jan 25, 2025 · 0 comments

Comments

@robcxyz
Copy link
Contributor

robcxyz commented Jan 25, 2025

It seems like if the cache is not populated the service will crash?

Wait 4 days to see if this is still there as this is on initial sync - could have something to do with that.

{"level":"INFO","ts":"2025-01-25T01:38:45.863Z","caller":"api/api.go:29","msg":"GET /version"}
{"level":"INFO","ts":"2025-01-25T01:38:46.918Z","caller":"api/api.go:29","msg":"GET /api/v1/stats"}
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 131 [running]:
github.com/sudoblockio/icon-go-api/api/rest.GetMarketCap()
    /build/api/rest/stats_utils.go:76 +0x5bd
github.com/sudoblockio/icon-go-api/api/rest.UpdateMarketCap()
    /build/api/rest/stats_utils.go:90 +0x57
github.com/sudoblockio/icon-go-api/api/rest.handlerGetStats(0xc000fd6000)
    /build/api/rest/stats.go:31 +0x2a
github.com/gofiber/fiber/v2.(*App).next(0xc0006b0000, 0xc000fd6000)
    /go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:132 +0x1be
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc00001a140?)
    /go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:803 +0x53
github.com/gofiber/fiber/v2/middleware/compress.New.func3(0xc000fd6000)
    /go/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/compress/compress.go:54 +0x45
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc000fbc318?)
    /go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:800 +0x43
github.com/gofiber/fiber/v2/middleware/cors.New.func1(0xc000fd6000)
    /go/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:141 +0x292
github.com/gofiber/fiber/v2.(*Ctx).Next(0x0?)
    /go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:800 +0x43
github.com/sudoblockio/icon-go-api/api.Start.func1(0xda7ec0?)
    /build/api/api.go:32 +0x126
github.com/gofiber/fiber/v2.(*App).next(0xc0006b0000, 0xc000fd6000)
    /go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:132 +0x1be
github.com/gofiber/fiber/v2.(*App).handler(0xc0006b0000, 0x4c4e37?)
    /go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:159 +0x45
github.com/valyala/fasthttp.(*Server).serveConn(0xc0006b8000, {0x1021560?, 0xc00007a018})
    /go/pkg/mod/github.com/valyala/[email protected]/server.go:2308 +0x1268
github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc00074e000, 0xc000724300)
    /go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:224 +0xa9
github.com/valyala/fasthttp.(*workerPool).getCh.func1()
    /go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x38
created by github.com/valyala/fasthttp.(*workerPool).getCh
    /go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:195 +0x1b0
Stream closed EOF for icon-tracker-mainnet-v2/icon-tracker-mainnet-v2-api-api-od-5df5f6c9d9-jfdhw (icon-go-api-api)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant