ehang-io / nps

一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
https://ehang.io/nps/documents
GNU General Public License v3.0
29.73k stars 5.37k forks source link

npc 长时间运行后cpu占用高,重启/停止报错 #1214

Open bensjohn opened 1 year ago

bensjohn commented 1 year ago

Describe the bug 运行十天左右top显示占用300%cpu。实际nps的服务只有我一个人在用,不应该这么高

Tasks: 170 total,   1 running, 169 sleeping,   0 stopped,   0 zombie
%Cpu(s): 75.2 us,  0.1 sy,  0.0 ni, 24.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    984.1 total,    342.0 free,    277.8 used,    364.3 buff/cache
MiB Swap:    492.1 total,    436.1 free,     56.0 used.    652.7 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                 
    994 root      20   0  716360  49196   4548 S 299.3   4.9   8965:32 npc                                                                     
    165 root     -91   0       0      0      0 S   0.3   0.0  24:09.25 sdiohal_rx_thre                                                         
 622405 root      20   0    9948   3476   2740 R   0.3   0.3   0:00.18 top   

root@orangepizero2:/var/log# /usr/local/npc/npc stop
2023/06/13 19:29:31.483 [E] [npc.go:139]  Valid actions: ["start" "stop" "restart" "install" "uninstall"]
Failed to stop nps内网穿透客户端: exit status 5
root@orangepizero2:/var/log# /usr/local/npc/npc restart
2023/06/13 19:29:37.022 [E] [npc.go:139]  Valid actions: ["start" "stop" "restart" "install" "uninstall"]
Failed to restart nps内网穿透客户端: exit status 5

To Reproduce 长时间运行后可出现

Expected behavior 为什么占用高,以及如何重启

Screenshots or logs npc.log有未知的ip尝试连接日志,但并发不高

Server (please complete the following information):

Client (please complete the following information):

Additional context Add any other context about the problem here.

GXJ6 commented 10 months ago

大佬,你解决了没

acoffeeworld commented 9 months ago

我也一样,CPU直接爆了