Weird CPU usage on REPL

Hi,

I have a boosted REPL on which I am hosting an API which is not too CPU intensive. The REPL is also set to Always On, but I noticed it seems to be shutting down randomly, and these shutdowns align with the CPU usage counter showing that the CPU usage limit has been rached. However, I am now trying to optimize my code with the repl not running, and the line set to run the server commented out so that someone accessing the API cannot automatically start the server, but the CPU counter is still randomly turning red and saying that the CPU usage limit has been reached even though nothing is running. I believe this may be a bug. If I need to post some sort of logs to help debug the issue, please let me know how to export them.

2 Likes

See if disabling ‘code intelligence’ in tools > settings lowers the CPU usage. To help debug the issue, sending a link to the repl or a minimal repl which reproduces the issue would be helpful

1 Like

This happened to me on a Python Repl exactly at the same time as a few other people were saying this in the Discord.

Hmm… try what @UMARismyname suggested, and keep optimizing your code. Other than that, the CPU usages spike up randomly for most of us.

1 Like

My code is fairly short and runs perfectly fine on a e2-small GCP instance, so I would expect that if the replit is allocated similar resources, everything should work fine. The problem here is that CPU usage on a boosted REPL (double the resource of e2-small) is hitting 100% when no code is running, so the code isn’t even allowed to run.

Odd… definetly something with Replit’s allocation. Maybe contact Replit support.

1 Like

Hi @rohanpatra I’ll move this topic to #bug-reports so it can be investigated.

1 Like

Please send me the link to your repl and I’ll take a look.

https://replit.com/@rohanpatra/mZhiZCtMdwkf3DEOMHyz#main.py

Looks like you removed your .replit file. The repl isn’t running as a result of this. If your repl’s resources are overflowing, try running kill 1 in the shell to force a reboot.