Forums

CPU usage high

I'm developing an app and it consumed almost 1400 CPU seconds, is there any way I can check what's going on?

We need more details about what you did and what kid of app is that. Email us at support@pythonanywhere.com if you do not want to share detail on public forums.

For now, it's a simple login/register flask app with mysql connection and integration with a banking singleton object, used for payments. I checked the logs, nobody is using it and it keeps growing in CPU consumption.

Web apps do not use CPU seconds. You must have some other code running.

One possibility is that the CPU usage on your account is coming from Jupyter/IPython notebooks. They continue to run, even when you're not viewing them, and when they're idle they "sip" CPU power at a rate of about a second per minute. In the processes table at the bottom of the Consoles page they'll have names like "jupyter", "sudospawner", or "kernel". It can be a bit tricky to spot that they're using up the CPU because they do it by spawning a new process, which uses up about a second, then exits -- the parent process that's doing the spawning doesn't use up much CPU by doing that, and of course the processes that start then stop are very ephemeral, so you will probably not see them.

It was it. I killed the processes regarding jupyter and the CPU consumption immediately stopped.