MindHunter86 / addie

AniLibria media delivery manager
https://anilibria.tv
MIT License
0 stars 1 forks source link

panic on cold restart #100

Closed MindHunter86 closed 11 months ago

MindHunter86 commented 11 months ago

https://github.com/MindHunter86/addie/blob/9eeb3032aea7b60bc67f777de04bdc53cbc2fd0b/balancer/cbalancer.go#L112-L115

1342:stderr,panic: runtime error: integer divide by zero@+
1343-stderr goroutine 69 [running]:+)
1344-stderrruntime/debug.Stack())4
1345-stderr     runtime/debug/stack.go:24 +0x654u
1346-stderragithub.com/MindHunter86/addie/app.(*App).fiberConfigure.func3(0xc0002ae000, {0x9ce6a0, 0xf27500})uJ
1347-stderr6    github.com/MindHunter86/addie/app/router.go:113 +0xeaJP
--
1350:stderrߘpanic({0x9ce6a0, 0xf27500})/0
1351:stderr     runtime/panic.go:884 +0x2120
1352-stderr~github.com/MindHunter86/addie/balancer.(*ClusterBalancer).getServer(0xc00009b080, 0x56ff844ec545f0eb, 0xe4120ccfa7feea35, 0x3)S
1353-stderr?    github.com/MindHunter86/addie/balancer/cbalancer.go:114 +0x14aS
1354-stderrgithub.com/MindHunter86/addie/balancer.(*ClusterBalancer).BalanceByChunkname(0xc00009b080, {0xc000448250, 0x9}, {0xc0000cf980, 0x26}, 0x20?)S
1355-stderr?    github.com/MindHunter86/addie/balancer/cbalancer.go:132 +0x11dS
1356-stderrygithub.com/MindHunter86/addie/app.(*App).balanceFiberRequest(0xc0001a18f0, 0x9a23ff?, {0xc0003d2d98, 0x1, 0xc0002a56e0?})K

panic after 'cold' restart under high production traffic Is it likes, isDown must be enabled by default for cloud cluster?

todo: debug m.size on service bootstrap

MindHunter86 commented 11 months ago

New logs

9:45AM INF methods.go:189 > format is old new=/720/ old=/1080/ uri=/videos/media/ts/8654/7/1080/fff86.ts
Error debug: Request Timeout
Context debug: #0000000000000000 - XXX:8089 <-> XXX:63780 - GET http:///
panic: interface conversion: interface {} is nil, not *zerolog.Logger

goroutine 576 [running]:
github.com/MindHunter86/addie/app.rlog(...)
        github.com/MindHunter86/addie/app/app.go:262
github.com/MindHunter86/addie/app.NewApp.func1(0xc0009de300, {0xb46580, 0xc000098270})
        github.com/MindHunter86/addie/app/app.go:107 +0x3ab
MindHunter86 commented 11 months ago

panic replay

XXX@XXX:~$ telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connection closed by foreign host.