Coder Social home page Coder Social logo

mindhunter86 / addie Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 8.08 MB

AniLibria media delivery manager

Home Page: https://anilibria.tv

License: MIT License

Go 98.82% Dockerfile 1.18%
anilibria nginx anilibria-caches golang golang-application cdn content-delivery content-router hls

addie's Introduction

ADDIE

Release Build Status CodeQL Status GoDoc Go Report Card License

DeepSource DeepSource GitHub issues Current Work

ADDIE is an acronym from AniLibria media delivery manager.

ADDIE helps to provide high-quality media content with high stability and minimal latency. Every minute it serves about 100 thousand requests from 10 thousand people who loves anime!

Warning!

This software is maintained by the official AniLibria project team! It is developed for project internal purpose and will not be updated for public use.

For any questions, please open the issue in a free format.

addie's People

Contributors

deepsourcebot avatar dependabot[bot] avatar mindhunter86 avatar

Watchers

 avatar  avatar

addie's Issues

FastHttp panic

9:03PM INF runtime.go:292 > runtime config - applied lottery chance 100
9:04PM INF runtime.go:316 > runtime config - applied quality 1080
9:05PM INF runtime.go:252 > runtime config - blocklist status updated
panic: BUG: error in SetWriteDeadline(200ms): set tcp4 XXX:8089: use of closed network connection

goroutine 4191 [running]:
github.com/valyala/fasthttp.(*Server).serveConn(0xc0001c0200, {0xb4ce80?, 0xc000013ba0})
        github.com/valyala/[email protected]/server.go:2380 +0x1f85
github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0001c50e0, 0xc0000633a0)
        github.com/valyala/[email protected]/workerpool.go:224 +0xa9
github.com/valyala/fasthttp.(*workerPool).getCh.func1()
        github.com/valyala/[email protected]/workerpool.go:196 +0x38
created by github.com/valyala/fasthttp.(*workerPool).getCh
        github.com/valyala/[email protected]/workerpool.go:195 +0x1b0

runtime err

stderrڶ]10:24AM INF trying to get series from api sid=30 tid=9196qU
stdoutڶAfilter=id%2Ccode%2Cnames%2Cupdated%2Clast_change%2Cplayer&id=9196U
stderrΐڶ10:24AM ??? 2023-06-30T10:24:42Z | 200 |     2ms |   000 | GET     | /videos/media/ts/9117/5/720/01ffec06ec95fcbf624196588ca90e43_00010.ts 
stderrݜڶ10:24AM ??? 2023-06-30T10:24:42Z | 200 |     2ms |   000 | GET     | /videos/media/ts/9097/32/1080/47e27fcf2fc1c8a1f429ccc70aeec370_00040.ts 
stderrϐڶ10:24AM INF format is old new=/720/ old=/1080/ uri=/videos/media/ts/8682/16/1080/fff15.ts
stderrϐڶ10:24AM ??? 2023-06-30T10:24:42Z | 200 |     2ms |  000 | GET     | /videos/media/ts/8682/16/1080/fff15.ts 
stderrܐڶ10:24AM ERR could not rewrite quality for the request error="json: cannot unmarshal number 25.5 into Go struct field PlayerPlaylist.Player.Playlist.Serie of type uint16"

very high unbalancing

+-----------------+---------------+----------+-------------------------------------------------------------+
| ADDRESS         | NAME          | REQUESTS | LASTREQUEST                                                 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 116.202.104.78  | cache-cloud18 |  2313644 | 2023-07-05 16:44:45.926254092 +0000 UTC m=+278383.862425509 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 116.202.25.34   | cache-cloud12 |  2174991 | 2023-07-05 16:44:45.872106089 +0000 UTC m=+278383.808277506 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 116.202.9.111   | cache-cloud4  |  2130328 | 2023-07-05 16:44:45.935796232 +0000 UTC m=+278383.871967649 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 142.132.224.165 | cache-cloud14 |  2068222 | 2023-07-05 16:44:45.882041074 +0000 UTC m=+278383.818212491 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 157.90.144.150  | cache-cloud15 |  2049517 | 2023-07-05 16:44:45.882606953 +0000 UTC m=+278383.818778369 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 157.90.250.119  | cache-cloud6  |  2040718 | 2023-07-05 16:44:45.841803291 +0000 UTC m=+278383.777974709 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 168.119.111.191 | cache-cloud7  |  2013407 | 2023-07-05 16:44:45.920902611 +0000 UTC m=+278383.857074028 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 168.119.187.168 | cache-cloud1  |  1998204 | 2023-07-05 16:44:45.864486846 +0000 UTC m=+278383.800658263 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 168.119.191.42  | cache-cloud16 |  1990695 | 2023-07-05 16:44:45.909933161 +0000 UTC m=+278383.846104578 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 168.119.250.38  | cache-cloud9  |  1978208 | 2023-07-05 16:44:45.935080795 +0000 UTC m=+278383.871252211 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 23.88.40.35     | cache-cloud5  |  1967786 | 2023-07-05 16:44:45.893720642 +0000 UTC m=+278383.829892059 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 49.12.216.46    | cache-cloud13 |  1954161 | 2023-07-05 16:44:45.845957222 +0000 UTC m=+278383.782128639 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 5.75.232.121    | cache-cloud3  |  1915247 | 2023-07-05 16:44:45.90545306 +0000 UTC m=+278383.841624477  |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 78.46.130.196   | cache-cloud8  |  1892343 | 2023-07-05 16:44:45.87539987 +0000 UTC m=+278383.811571288  |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 78.46.203.19    | cache-cloud2  |  1872373 | 2023-07-05 16:44:45.914920981 +0000 UTC m=+278383.851092399 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 78.46.205.79    | cache-cloud11 |  1858962 | 2023-07-05 16:44:45.936659717 +0000 UTC m=+278383.872831135 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 88.99.121.3     | cache-cloud17 |  1810472 | 2023-07-05 16:44:45.911208176 +0000 UTC m=+278383.847379593 |
+-----------------+---------------+----------+-------------------------------------------------------------+
| 88.99.84.138    | cache-cloud10 |  1789068 | 2023-07-05 16:44:45.929194693 +0000 UTC m=+278383.865366110 |
+-----------------+---------------+----------+-------------------------------------------------------------+

as u see unbalancing value is 22.6%

panic in UpdateServers

stderrgoroutine 5 [running]:*t
stderr`github.com/MindHunter86/addie/balancer.(*ClusterBalancer).UpdateServers(0xc00009af00, 0xa75aff?)tS
stderr֕? github.com/MindHunter86/addie/balancer/cbalancer.go:189 +0xb85Sy
stderrꕮegithub.com/MindHunter86/addie/app.(*consulClient).listenClusterEvents(0x0?, {0xb4bab8, 0xc00009af00})yK
stderr7        github.com/MindHunter86/addie/app/consul.go:196 +0x3ecKW
stderr㜖Cgithub.com/MindHunter86/addie/app.(*consulClient).bootstrap.func3()WI
stderr5 github.com/MindHunter86/addie/app/consul.go:96 +0x25Iq
stderrΖ]github.com/MindHunter86/addie/app.(*consulClient).bootstrap.func1.1(0xc00002e060, 0x0?, 0x0?)qI
stderr5 github.com/MindHunter86/addie/app/consul.go:76 +0x26I`
stderrLcreated by github.com/MindHunter86/addie/app.(*consulClient).bootstrap.func1`I
stderr5 github.com/MindHunter86/addie/app/consul.go:75 +0xeaI@
stderr,panic: runtime error: integer divide by zero@

panic

panic: interface conversion: interface {} is nil, not utils.TitleQuality                                                                                                                                                                                                                                                     goroutine 2468 [running]:                                                                                                                                                                                                                                                                                                    runtime/debug.Stack()                                                                                                                                                                                                                                                                                                                runtime/debug/stack.go:24 +0x65                                                                                                                                                                                                                                                                                      github.com/MindHunter86/addie/app.(*App).fiberConfigure.func1(0xc000ca2600, {0xadb980, 0xc000fccd20})                                                                                                                                                                                                                                github.com/MindHunter86/addie/app/router.go:48 +0xea                                                                                                                                                                                                                                                                 github.com/gofiber/fiber/v2/middleware/recover.New.func1.1()                                                                                                                                                                                                                                                                         github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:31 +0x7a                                                                                                                                                                                                                                           panic({0xadb980, 0xc000fccd20})                                                                                                                                                                                                                                                                                                      runtime/panic.go:884 +0x212                                                                                                                                                                                                                                                                                          github.com/MindHunter86/addie/app.(*App).fbMidAppFakeQuality(0xc00022c0e0, 0xa4add5?)                                                                                                                                                                                                                                  
        github.com/MindHunter86/addie/app/middleware.go:94 +0x434
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc0002f2c00?)
        github.com/gofiber/fiber/[email protected]/ctx.go:1027 +0x43
github.com/gofiber/fiber/v2/middleware/limiter.FixedWindow.New.func1(0xc000ca2600)
        github.com/gofiber/fiber/[email protected]/middleware/limiter/limiter_fixed.go:33 +0x3ee
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc000ca2600?)
        github.com/gofiber/fiber/[email protected]/ctx.go:1027 +0x43
github.com/MindHunter86/addie/app.(*App).fbMidAppBlocklist(0xc00022c0e0, 0xc000bc67f0?)
        github.com/MindHunter86/addie/app/middleware.go:229 +0x1a5
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc0003aa198?)
        github.com/gofiber/fiber/[email protected]/ctx.go:1027 +0x43
github.com/gofiber/fiber/v2/middleware/skip.New.func1(0xad29e0?)
        github.com/gofiber/fiber/[email protected]/middleware/skip/skip.go:16 +0x39
github.com/gofiber/fiber/v2.(*App).next(0xc00028a000, 0xc000ca2600)
        github.com/gofiber/fiber/[email protected]/router.go:145 +0x1bf
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc00247c330?)
        github.com/gofiber/fiber/[email protected]/ctx.go:1030 +0x53
github.com/gofiber/fiber/v2/middleware/cors.New.func1(0xc000ca2600)
        github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:191 +0x2da
github.com/gofiber/fiber/v2.(*Ctx).Next(0x4536a9?)
        github.com/gofiber/fiber/[email protected]/ctx.go:1027 +0x43
github.com/gofiber/fiber/v2/middleware/compress.New.func3(0xc000ca2600)
        github.com/gofiber/fiber/[email protected]/middleware/compress/compress.go:55 +0x45
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc000ca2600?)
        github.com/gofiber/fiber/[email protected]/ctx.go:1027 +0x43
github.com/gofiber/fiber/v2/middleware/favicon.New.func1(0xc000ca2600)
        github.com/gofiber/fiber/[email protected]/middleware/favicon/favicon.go:121 +0xae
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc000ca2600?)
        github.com/gofiber/fiber/[email protected]/ctx.go:1027 +0x43
github.com/gofiber/fiber/v2/middleware/pprof.New.func1(0xc000ca2600)
        github.com/gofiber/fiber/[email protected]/middleware/pprof/pprof.go:46 +0x535
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc00247c4e0?)
        github.com/gofiber/fiber/[email protected]/ctx.go:1027 +0x43
github.com/MindHunter86/addie/app.(*App).fiberConfigure.func3(0xc000ca2600)
        github.com/MindHunter86/addie/app/router.go:88 +0x15e
github.com/gofiber/fiber/v2.(*Ctx).Next(0x14bd370?)

keepalive support check

13:28:07.392287 IP 127.0.0.1.8089 > 127.0.0.1.48576: Flags [S.], seq 2708045960, ack 3101577348, win 43690, options [mss 65495,sackOK,TS val 3613697252 ecr 3613697252,nop,wscale 11], length 0
13:28:07.393858 IP 127.0.0.1.48592 > 127.0.0.1.8089: Flags [S], seq 2967456395, win 43690, options [mss 65495,sackOK,TS val 3613697254 ecr 3613662230,nop,wscale 11], length 0
13:28:07.393865 IP 127.0.0.1.8089 > 127.0.0.1.48592: Flags [S.], seq 444273248, ack 2967456396, win 43690, options [mss 65495,sackOK,TS val 3613697254 ecr 3613697254,nop,wscale 11], length 0
13:28:07.395794 IP 127.0.0.1.48596 > 127.0.0.1.8089: Flags [S], seq 3507550068, win 43690, options [mss 65495,sackOK,TS val 3613697256 ecr 0,nop,wscale 11], length 0
13:28:07.395799 IP 127.0.0.1.8089 > 127.0.0.1.48596: Flags [S.], seq 694284797, ack 3507550069, win 43690, options [mss 65495,sackOK,TS val 3613697256 ecr 3613697256,nop,wscale 11], length 0
13:28:07.395890 IP 127.0.0.1.48600 > 127.0.0.1.8089: Flags [S], seq 587469951, win 43690, options [mss 65495,sackOK,TS val 3613697256 ecr 3613674895,nop,wscale 11], length 0
13:28:07.395895 IP 127.0.0.1.8089 > 127.0.0.1.48600: Flags [S.], seq 3142762653, ack 587469952, win 43690, options [mss 65495,sackOK,TS val 3613697256 ecr 3613697256,nop,wscale 11], length 0
13:28:07.402939 IP 127.0.0.1.48612 > 127.0.0.1.8089: Flags [S], seq 261994710, win 43690, options [mss 65495,sackOK,TS val 3613697263 ecr 0,nop,wscale 11], length 0
13:28:07.402944 IP 127.0.0.1.8089 > 127.0.0.1.48612: Flags [S.], seq 3948940758, ack 261994711, win 43690, options [mss 65495,sackOK,TS val 3613697263 ecr 3613697263,nop,wscale 11], length 0
13:28:07.403617 IP 127.0.0.1.48622 > 127.0.0.1.8089: Flags [S], seq 111722333, win 43690, options [mss 65495,sackOK,TS val 3613697264 ecr 0,nop,wscale 11], length 0
13:28:07.403622 IP 127.0.0.1.8089 > 127.0.0.1.48622: Flags [S.], seq 2458276047, ack 111722334, win 43690, options [mss 65495,sackOK,TS val 3613697264 ecr 3613697264,nop,wscale 11], length 0
13:28:07.409992 IP 127.0.0.1.48624 > 127.0.0.1.8089: Flags [S], seq 423220565, win 43690, options [mss 65495,sackOK,TS val 3613697270 ecr 3613662238,nop,wscale 11], length 0
13:28:07.409998 IP 127.0.0.1.8089 > 127.0.0.1.48624: Flags [S.], seq 570471549, ack 423220566, win 43690, options [mss 65495,sackOK,TS val 3613697270 ecr 3613697270,nop,wscale 11], length 0
13:28:07.413201 IP 127.0.0.1.48628 > 127.0.0.1.8089: Flags [S], seq 2558937, win 43690, options [mss 65495,sackOK,TS val 3613697273 ecr 3613662240,nop,wscale 11], length 0
13:28:07.413206 IP 127.0.0.1.8089 > 127.0.0.1.48628: Flags [S.], seq 2690697728, ack 2558938, win 43690, options [mss 65495,sackOK,TS val 3613697273 ecr 3613697273,nop,wscale 11], length 0
13:28:07.413484 IP 127.0.0.1.48640 > 127.0.0.1.8089: Flags [S], seq 4055799732, win 43690, options [mss 65495,sackOK,TS val 3613697273 ecr 3613643936,nop,wscale 11], length 0
13:28:07.413490 IP 127.0.0.1.8089 > 127.0.0.1.48640: Flags [S.], seq 183499375, ack 4055799733, win 43690, options [mss 65495,sackOK,TS val 3613697273 ecr 3613697273,nop,wscale 11], length 0
13:28:07.417197 IP 127.0.0.1.48650 > 127.0.0.1.8089: Flags [S], seq 1529512637, win 43690, options [mss 65495,sackOK,TS val 3613697277 ecr 3613674903,nop,wscale 11], length 0
13:28:07.417202 IP 127.0.0.1.8089 > 127.0.0.1.48650: Flags [S.], seq 3486317543, ack 1529512638, win 43690, options [mss 65495,sackOK,TS val 3613697277 ecr 3613697277,nop,wscale 11], length 0
13:28:07.420308 IP 127.0.0.1.48666 > 127.0.0.1.8089: Flags [S], seq 3924097511, win 43690, options [mss 65495,sackOK,TS val 3613697280 ecr 3613657606,nop,wscale 11], length 0
13:28:07.420324 IP 127.0.0.1.8089 > 127.0.0.1.48666: Flags [S.], seq 1058208436, ack 3924097512, win 43690, options [mss 65495,sackOK,TS val 3613697280 ecr 3613697280,nop,wscale 11], length 0
13:28:07.427449 IP 127.0.0.1.48670 > 127.0.0.1.8089: Flags [S], seq 1757285592, win 43690, options [mss 65495,sackOK,TS val 3613697287 ecr 3613662247,nop,wscale 11], length 0
13:28:07.427455 IP 127.0.0.1.8089 > 127.0.0.1.48670: Flags [S.], seq 2590929877, ack 1757285593, win 43690, options [mss 65495,sackOK,TS val 3613697287 ecr 3613697287,nop,wscale 11], length 0
13:28:07.427974 IP 127.0.0.1.48684 > 127.0.0.1.8089: Flags [S], seq 3663972501, win 43690, options [mss 65495,sackOK,TS val 3613697288 ecr 0,nop,wscale 11], length 0
13:28:07.427983 IP 127.0.0.1.8089 > 127.0.0.1.48684: Flags [S.], seq 575791961, ack 3663972502, win 43690, options [mss 65495,sackOK,TS val 3613697288 ecr 3613697288,nop,wscale 11], length 0
13:28:07.435105 IP 127.0.0.1.48692 > 127.0.0.1.8089: Flags [S], seq 1860041805, win 43690, options [mss 65495,sackOK,TS val 3613697295 ecr 3613662257,nop,wscale 11], length 0
13:28:07.435111 IP 127.0.0.1.8089 > 127.0.0.1.48692: Flags [S.], seq 2643564951, ack 1860041806, win 43690, options [mss 65495,sackOK,TS val 3613697295 ecr 3613697295,nop,wscale 11], length 0
13:28:07.436618 IP 127.0.0.1.48704 > 127.0.0.1.8089: Flags [S], seq 1945105533, win 43690, options [mss 65495,sackOK,TS val 3613697297 ecr 0,nop,wscale 11], length 0
13:28:07.436624 IP 127.0.0.1.8089 > 127.0.0.1.48704: Flags [S.], seq 869652297, ack 1945105534, win 43690, options [mss 65495,sackOK,TS val 3613697297 ecr 3613697297,nop,wscale 11], length 0
13:28:07.439768 IP 127.0.0.1.48714 > 127.0.0.1.8089: Flags [S], seq 1750289726, win 43690, options [mss 65495,sackOK,TS val 3613697300 ecr 3613662274,nop,wscale 11], length 0
13:28:07.439773 IP 127.0.0.1.8089 > 127.0.0.1.48714: Flags [S.], seq 4206094416, ack 1750289727, win 43690, options [mss 65495,sackOK,TS val 3613697300 ecr 3613697300,nop,wscale 11], length 0
13:28:07.447019 IP 127.0.0.1.48722 > 127.0.0.1.8089: Flags [S], seq 131175622, win 43690, options [mss 65495,sackOK,TS val 3613697307 ecr 0,nop,wscale 11], length 0
13:28:07.447027 IP 127.0.0.1.8089 > 127.0.0.1.48722: Flags [S.], seq 748633730, ack 131175623, win 43690, options [mss 65495,sackOK,TS val 3613697307 ecr 3613697307,nop,wscale 11], length 0
13:28:07.450547 IP 127.0.0.1.48734 > 127.0.0.1.8089: Flags [S], seq 2167440984, win 43690, options [mss 65495,sackOK,TS val 3613697310 ecr 0,nop,wscale 11], length 0
13:28:07.450555 IP 127.0.0.1.8089 > 127.0.0.1.48734: Flags [S.], seq 2131807477, ack 2167440985, win 43690, options [mss 65495,sackOK,TS val 3613697310 ecr 3613697310,nop,wscale 11], length 0

panic

210259-stderr9:02PM WRN abnormal api response; trying to parse api error object... api_method=/getTitle api_response_code=404
210260-stderr9:02PM WRN api error object has been parse error_code=404 error_desc="Title for ID '9264' not found!"[
210261:stderrGpanic: runtime error: invalid memory address or nil pointer dereference[[
210262-stderrȰG[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x8a8c6e][
210263-stderrȰ,
210264-stderrܡȰgoroutine 775 [running]:,|
210265-stderrhgithub.com/MindHunter86/anilibria-hlp-service/app.(*App).validateTitleFromApiResponse(0xc0004f23f0, 0x0)|2
210266-stderrȰ  /app/app/methods.go:122 +0x2e2
210267-stderrrgithub.com/MindHunter86/anilibria-hlp-service/app.(*App).getTitleSeriesFromApi(0xc000206000?, {0xc00052e1a1, 0x4})3
210268-stderrȰ  /app/app/methods.go:118 +0x1183|
210269-stderrȰhgithub.com/MindHunter86/anilibria-hlp-service/app.(*App).doTitleSerieRequest(0xc0000142e8, 0xc000597878)|3
210270-stderr   /app/app/methods.go:173 +0x19f3
210271-stderrxgithub.com/MindHunter86/anilibria-hlp-service/app.(*App).getUriWithFakeQuality(0xc00016e000?, {0xc00052e190, 0x46}, 0x2)/
210272-stderrȰ  pp/app/app.go:269 +0x5bf/t
210273-stderrȰ`github.com/MindHunter86/anilibria-hlp-service/app.(*App).hlpHandler(0xc0003e1c48?, 0xc00016e000)t/
210274-stderrȰ  pp/app/app.go:223 +0x73a/l
210275-stderrȰXgithub.com/valyala/fasthttp.(*Server).serveConn(0xc0000aa480, {0xa55b48?, 0xc0005188d0})l[
210276-stderrG  /go/pkg/mod/github.com/valyala/[email protected]/server.go:2338 +0x1268[d
210277-stderrȰPgithub.com/valyala/fasthttp.(*workerPool).workerFunc(0xc000128a00, 0xc0004e7da0)d\
210278-stderrH  /go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:224 +0xa9\K
210279-stderr7github.com/valyala/fasthttp.(*workerPool).getCh.func1()K\
210280-stderrȰH /go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x38\N
210281-stderrȰ:created by github.com/valyala/fasthttp.(*workerPool).getChN]
210282-stderrȰI /go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:195 +0x1b0]W

bug/logging - user-agent is undefined

8:46AM INF id=26ae0b40-fdc2-44e9-9ea8-bb6bd985cb98 ip=xxx latency=0.073 method=GET path=/videos/media/ts/9476/2/720/a82a17f0b1518fc11bf309282ee28216_00031.ts status=200 user-agent=
8:46AM INF id=27ae0b40-fdc2-44e9-9ea8-bb6bd985cb98 ip=xxx latency=0.048 method=GET path=/videos/media/ts/9427/3/480/4bdd928b29210c79f6150bc019095dbc_00005.ts status=200 user-agent=
8:46AM INF id=28ae0b40-fdc2-44e9-9ea8-bb6bd985cb98 ip=xxx latency=0.041 method=GET path=/videos/media/ts/9504/2/1080/79fa8e00c6fc1eed85b1c20f4b18f599_00014.ts status=200 user-agent=

panic on cold restart

addie/balancer/cbalancer.go

Lines 112 to 115 in 9eeb303

// by default coll = 0, but if balancer receive errors: coll += 1 (limited by const MaxTries)
// ? maybe `MaxTries^coll` is not needed; use `coll` only?
idx0 := (idx1 % uint64(m.size)) + (idx2 % uint64(m.size)) + uint64(MaxTries^coll)
ip = m.ips[idx0%uint64(m.size)]

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

runtime err

stdoutɡڶAfilter=id%2Ccode%2Cnames%2Cupdated%2Clast_change%2Cplayer&id=9263Up
stderrڶ\10:19AM INF trying to get series from api sid=8 tid=9263p
stderr10:19AM ERR could not rewrite quality for the request error="there is an empty result in the response"

filter incoming requests

vscode ➜ /workspaces/repos/anilibria-hlp-service (feature/anilibria) $ go run --race main.go -l trace --http-debug
12:45PM DBG ready... func=main.main.func2
12:45PM DBG args=["/tmp/go-build1613621553/b001/exe/main","-l","trace","--http-debug"] func=main.main.func2
12:45PM DBG initiate main event loop func=app.(*App).loop
12:45PM DBG called fake quality func=app.(*App).getUriWithFakeQuality
panic: runtime error: index out of range [6] with length 2

goroutine 71 [running]:
github.com/MindHunter86/anilibria-hlp-service/app.(*TitleSerieRequest).getTitleQuality(...)
	/workspaces/repos/anilibria-hlp-service/app/methods.go:246
github.com/MindHunter86/anilibria-hlp-service/app.(*App).getUriWithFakeQuality(0xc0002b9778?, {0xc00034e0f7, 0x9}, 0x3)
	/workspaces/repos/anilibria-hlp-service/app/app.go:253 +0xec5
github.com/MindHunter86/anilibria-hlp-service/app.(*App).hlpHandler(0x63aae8ed?, 0xc0005f4000)
	/workspaces/repos/anilibria-hlp-service/app/app.go:223 +0x895
github.com/valyala/fasthttp.(*Server).serveConn(0xc0005ea000, {0xdb6208?, 0xc0000b0018})
	/go/pkg/mod/github.com/valyala/[email protected]/server.go:2338 +0x1c03
github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0005ec000, 0xc0000ce020)
	/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:224 +0xef
github.com/valyala/fasthttp.(*workerPool).getCh.func1()
	/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x54
created by github.com/valyala/fasthttp.(*workerPool).getCh
	/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:195 +0x365
exit status 2

runtime err, fquality not working

stderr߰9:48AM INF id=cba81816-570b-4cc3-a151-e92784a5a2f6 ip=0000 latency=0.529 method=GET path=/videos/media/ts/9212/2/480/4ebbdd4cc5cf4f4a00d43461b6a7a0ea_00055.ts status=200 user-agent=$e
stderr󽀥Q9:48AM WRN error="cache: tid, sid zero found"eo
stderr󽀥[9:48AM INF trying to get series from api sid=0 tid=9471oU
stdoutҳ�Afilter=id%2Ccode%2Cnames%2Cupdated%2Clast_change%2Cplayer&id=9471U
stderr9:48AM INF id=cda81816-570b-4cc3-a151-e92784a5a2f6 ip=000 latency=0.525 method=GET path=/videos/media/ts/8918/23/720/fff94.ts status=200 user-agent=
stderr9:48AM WRN error="cache: serie.Title, serie.Serie zero found or serie is undefined" sid=0 tid=9471
stderr9:48AM ERR could not rewrite quality for the request error="cache: serie.Title, serie.Serie zero found or serie is undefined"$

runtime errs

stderrڶ10:17AM INF format is old new=/720/ old=/1080/ uri=/videos/media/ts/8679/12/1080/fff64.ts
stderrڶ\10:17AM INF trying to get series from api sid=3 tid=9398pU
stdout䆟ڶAfilter=id%2Ccode%2Cnames%2Cupdated%2Clast_change%2Cplayer&id=9398U
stderrڶ10:17AM ??? 2023-06-30T10:17:46Z | 200 |     3ms |    XXX | GET     | /videos/media/ts/9011/1/480/fff66.ts 
                                                                                                                           stderrڶ10:17AM ERR could not rewrite quality for the request error="json: cannot unmarshal number 1.1 into Go struct field PlayerPlaylist.Player.Playlist.Serie of type uint16"
stderrڶ10:17AM ??? 2023-06-30T10:17:46Z | 200 |    33ms |   XXX | GET     | /videos/media/ts/9398/3/1080/9f0df4cee06ef955a81c1738e3c7c58f_00012.ts 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.