Bug description: Replit will not run any of my Python code and often shows that my CPU is running on max, even though I have deleted all my other projects except for the current one. I’m a beginner so it’s very short and simple code.
The CPU rapidly jumps from about 15% to max for seemingly no reason. Console won’t even run a “Hello world”.
Deleting your other Repls will not help in speeding up the CPU. You can think about it this way: Each Repl gets its own CPU, Memory, and Storage. Running another Repl has its own CPU, Memory, and Storage. While this isn’t how it works in production (multiple Repls are running on the same server), this is a simple way to think about it.
Also, if you are on the free plan, the CPU Replit gives you is very low-end, so don’t expect much from it.
Also, Replit might get a little bit slow sometimes, so you might just have to wait a while and it will fix itself.
Here’s why your program won’t print out Hello world.:
If you turn on the Show Hidden Files setting: a new file will appear called .replit. In the file is a configuration that the Repl will read every time you hit the Run button. Your Repl is configured to run main.py, not Test.py.
you put your code in test.py, not main.py. Try moving your code to main.py and try again.
As for the CPU, this is probably just the python interpreter doing its thing, and its nothing to worry about (for now).
Thanks so much for your help! As a beginner I had no idea where to start
I cleared my cache and fixed the configuration in the hidden files. The code now runs but I still get random CPU maxing. This has been an issue for me since mid-June, but hopefully it eventually resolves.
RAM/CPU counters are funky on Replit, but they do take into account background processes as well (I believe code intelligence also goes in here too), which vary from language to language.