apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

why the apisix-dashboard take so much cpu and memory

Open Linindoo opened this issue 2 years ago • 14 comments

Issue description

image It`s is understandable to take some memory,but why it nend so much cpu resource?

Expected behavior

it shoud take a little cpu just when used,but now it`s strange

How to Reproduce

I can`t reproduce it

Screenshots

No response

Environment

  • apisix version (cmd: apisix version): 3.2.0
  • OS (cmd: uname -a): Linux gateway 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V): openresty/1.21.4.1
  • etcd version, if have (cmd: run etcd --version): 3.5.4
  • apisix-dashboard version, if have: 3.0.0

Additional context

No response

Linindoo avatar Mar 08 '24 02:03 Linindoo

I am also worried about apisix-dashboard using constant CPU, even when not in use. We have setup apisix using docker. The apisix-dashboard -> manager-api, process is constantly consuming above 8% CPU !!!

Screenshot from 2024-03-14 14-12-04

imtiaz-rahi avatar Mar 14 '24 08:03 imtiaz-rahi

@Linindoo can you please provide output (screenshot) of top / htop / btop for the manager-api of apisix-dashboard.

imtiaz-rahi avatar Mar 14 '24 08:03 imtiaz-rahi

sorry,The process has already been restarted

@Linindoo can you please provide output (screenshot) of top / htop / btop for the manager-api of apisix-dashboard.

Linindoo avatar Mar 19 '24 01:03 Linindoo

I also found that the use of memory was growing steadily, and I felt that there was a memory leak

image

susugo avatar Mar 22 '24 01:03 susugo

@Linindoo您能否提供 apisix-dashboard 的 manager-api 的 top / htop / btop 的输出(屏幕截图)。

image

susugo avatar Mar 22 '24 01:03 susugo

Definitely there are serious issues in the apisix-dashboard application. Even when the dashboard portal not opened in browser by any user, it is consuming CPU constantly. Also, from @jinjianming report, we can use memory usage also increasing over time.

Will the devs please look into this.

imtiaz-rahi avatar Mar 22 '24 16:03 imtiaz-rahi

try to apply this patch ? https://github.com/apache/apisix-dashboard/pull/2920

hanqingwu avatar Mar 27 '24 06:03 hanqingwu

try to apply this patch ? #2920

Is there a plan for this? When can I have a Docker image

susugo avatar Mar 27 '24 07:03 susugo

I have deployed this repair patch, but it is not working well as the memory is still floating up image

susugo avatar Apr 01 '24 02:04 susugo

I think maybe we should watch more time , because 20MB is so small sample

hanqingwu avatar Apr 01 '24 02:04 hanqingwu

我想也许我们应该多看一些时间,因为20MB的样本太小了

ok

susugo avatar Apr 01 '24 03:04 susugo