SkyAPM-nodejs icon indicating copy to clipboard operation
SkyAPM-nodejs copied to clipboard

High cpu and out of memory in production

Open zouyx opened this issue 5 years ago • 19 comments

there was high cpu usage , and high latency. but it was turn to normal when i shut down apm.

infomation: node client version:v1.0 thinkjs version:2.2

cpu idle: image

zouyx avatar Mar 16 '19 13:03 zouyx

What do you mean shutdown apm? Backend or agent?

And when do you shutdown? 7-10?

wu-sheng avatar Mar 16 '19 13:03 wu-sheng

shutdown agent.

first release at 3.14 21:00. and restart twice. first restart at 3.15 10:00, but i haven't realized the root cause. second time at 3.16 14:00, at the same time shutdown agent.

zouyx avatar Mar 16 '19 15:03 zouyx

But, after 3.16 1400, the cpu is still high. You said the agent shutdown.

wu-sheng avatar Mar 16 '19 15:03 wu-sheng

no , this is idle time

zouyx avatar Mar 16 '19 16:03 zouyx

I see. How many throughputs of your application?

wu-sheng avatar Mar 16 '19 16:03 wu-sheng

this app is avg 1 qps

zouyx avatar Mar 18 '19 06:03 zouyx

image

Flame graph in v1.0

zouyx avatar Mar 21 '19 14:03 zouyx

image

Flame graph in v1.1

zouyx avatar Mar 21 '19 14:03 zouyx

It seems like the CPU usage rate of V1.1 is better than V1.0's. I saw that the serialized object of GRPC Node.js costs lots of CPU time in V1.0, and I will investigate this problem.

ascrutae avatar Mar 21 '19 15:03 ascrutae

If the QPS is just 1, why does gRPC run in such high frequency? What is your strategy of activating gRPC? @ascrutae

wu-sheng avatar Mar 21 '19 16:03 wu-sheng

I had the same problem, so I temporarily removed the AMP part.

ZhouBox avatar Apr 10 '19 06:04 ZhouBox

@ZhouBox which version did you used?

zouyx avatar Apr 10 '19 06:04 zouyx

@zouyx 0.1.5

ZhouBox avatar Apr 10 '19 08:04 ZhouBox

SkyAPM-nodejs 0.1.5?

i fixed this problem in 1.1.0, you can try it out

zouyx avatar Apr 10 '19 09:04 zouyx

@zouyx sorry, I use skyapm-egg-require 0.1.5, SkyAPM-nodejs use 1.1.2.

ZhouBox avatar Apr 11 '19 05:04 ZhouBox

Ref #71

zouyx avatar Jun 11 '19 06:06 zouyx

+1

wuliupo avatar Apr 21 '20 07:04 wuliupo

@wuliupo i think this is new version for js as below

https://github.com/apache/skywalking-client-js

zouyx avatar Apr 21 '20 08:04 zouyx

@zouyx No, it isn't. That is for browser specific.

wu-sheng avatar Apr 21 '20 09:04 wu-sheng