Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

打200个并发后进程崩溃 #163

Open
xiexiaoxin01 opened this issue Aug 11, 2021 · 1 comment
Open

打200个并发后进程崩溃 #163

xiexiaoxin01 opened this issue Aug 11, 2021 · 1 comment

Comments

@xiexiaoxin01
Copy link

xiexiaoxin01 commented Aug 11, 2021

运行环境 Environment:

  • 操作系统 / Operating System:
    Ubuntu 2004
    -版本:Cardinal_v0.7.3_linux_amd64

发生了什么?/ What happened?
使用jmeter打200个并发后进程崩溃

您的预期结果是什么?/ What did you expect to happen?
解决崩溃问题

如何复现您的问题?/ How to reproduce your issue?
使用jmeter打200个提交flag的并发

额外的补充信息(堆栈信息、错误日志等)/ Any associated stack traces or error logs

�[35m(/home/github.com/vidar-team/Cardinal/internal/game/flag.go:40)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m

�[35m(/home/github.com/vidar-team/Cardinal/internal/game/flag.go:40)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m
[GIN] 2021/08/11 - 16:28:01 | 403 | 26.953411ms | 6.6.6.1 | POST /api/flag
[GIN] 2021/08/11 - 16:28:01 | 403 | 31.173154ms | 6.6.6.1 | POST /api/flag

�[35m(/home/github.com/vidar-team/Cardinal/internal/game/flag.go:40)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m
[GIN] 2021/08/11 - 16:28:01 | 403 | 36.285917ms | 6.6.6.1 | POST /api/flag

�[35m(/home/github.com/vidar-team/Cardinal/internal/game/flag.go:40)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m

�[35m(/home/github.com/vidar-team/Cardinal/internal/game/score.go:55)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m

�[35m(/home/github.com/vidar-team/Cardinal/internal/game/score.go:71)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m

�[35m(/home/github.com/vidar-team/Cardinal/internal/game/rank.go:86)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m

�[35m(/home/github.com/vidar-team/Cardinal/internal/logger/log.go:18)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m

�[35m(/home/github.com/vidar-team/Cardinal/internal/healthy/healthy.go:18)�[0m
�[33m[2021-08-11 16:28:01]�[0m �[31;1m Error 1040: Too many connections �[0m
panic: runtime error: index out of range [0] with length 0

goroutine 23 [running]:
github.com/vidar-team/Cardinal/internal/healthy.PreviousRoundScore(0xc00132d110)
/home/github.com/vidar-team/Cardinal/internal/healthy/healthy.go:48 +0x1fe
github.com/vidar-team/Cardinal/internal/healthy.HealthyCheck()
/home/github.com/vidar-team/Cardinal/internal/healthy/healthy.go:20 +0xcd
github.com/vidar-team/Cardinal/internal/game.CalculateRoundScore(0xb3)
/home/github.com/vidar-team/Cardinal/internal/game/score.go:49 +0x379
github.com/vidar-team/Cardinal/internal/timer.timerProcess()
/home/github.com/vidar-team/Cardinal/internal/timer/timer.go:191 +0x46e
created by github.com/vidar-team/Cardinal/internal/timer.Init
/home/github.com/vidar-team/Cardinal/internal/timer/timer.go:121 +0xd09

@Liki4
Copy link

Liki4 commented Aug 11, 2021

改个最大数据库连接数不麻烦的哥

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants