Discord Bot High CPU usage, visual error?

Hello, my bot has everyday over 100% cpu usage, but my bot responds pretty fast, is that a visual error or real?

Screenshot_703

1 Like

If this is constantly showing that it may not be an error. You may want to work on reducing CPU so the project is not suspended.

Yeah, it shows 100% likely 24/7.

Sometimes the CPU counter can bug out but if it shows 98% consistently it is probably right.

1 Like

Okay. Im trying to implement a fix for that so my project doesnt get banned.

grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}'

Run that in your projects console, if the result is the same as what the container stats show, then it is the correct value, otherwise there is probably a bug,

2 Likes

So its a Glitch bug?

Its showing 31% on console but 100% on App Status :slight_smile: Thanks for helping Callum-OKane and RiversideRocks

2 Likes

Same thing happens to my project, too for some reason!

1 Like

Unless there is something wrong with what I provided, it could be a glitch bug.
@glitch_support will take a look :slight_smile:

Even in another project I have, the container shows a lesser amount of CPU
than it shows in console.

I’ve tried this myself and it isn’t accurate. The project status reports 4% usage whilst the command shows 15%. This is because multiple projects run on the same host, and the command gets the total CPU usage for all projects running on the host combined.

1 Like

Tried it again in a project with 0% cpu (a VERY simple discord bot) and got like 60% on console.

1 Like

Seems the command doesn’t show the correct numbers…

For any project

I’ll notify @support_staff!

This also explains why my CPU has been shooting up to 140%!

Hey all! Thanks for reporting this. I’m investigating and will follow up when I have an update.

4 Likes

image
I don’t know why I posted here, just thought it was funny :^)

1 Like

glitch is glitchy

that is my answer

badum tsssssssssssss

1 Like