ivanfioravanti / chatbot-ollama

Chatbot Ollama is an open source chat UI for Ollama.
Other
1.33k stars 217 forks source link

CPU pegged to 100% #46

Closed insunaa closed 3 months ago

insunaa commented 4 months ago

Running the container is completely fine, but as soon as I open localhost:3000 in any graphical browser the tab pegs one CPU core to 100% and refuses to let go. I cannot scroll up with the scroll wheel, the site will immediately scroll back to the bottom (using the scrollbar at the side by hand works) It feels like you don't sync to vblank or whatever so your site just tries to render as many frames as the CPU allows? Either way no sleep of any kind seems to happen, making the project almost unusable.

Unfortunately I'm not a web-dev, so even if I wish I could, I can't really help.

image maybe this profiler callstack helps some. probably not given the obfuscation.

ivanfioravanti commented 4 months ago

I tried to replicate but no luck, has anyone else faced the same problem?

insunaa commented 4 months ago

If it helps any, I've been using Linux with Wayland and an Nvidia GPU (which doesn't have implicit sync implemented, and doesn't receive an explicit sync either). This does not occur with any other website tho, so I would be very skeptical to accept that as the reason

TheNaman047 commented 3 months ago

Yup I faced this today, my chrome tab usage went to 100% cpu. FYI: Was running via docker container if it helps

ivanfioravanti commented 3 months ago

can you please try again with latest?

insunaa commented 3 months ago

Latest docker pull seems to have fixed both the scrolling issue and the CPU usage issue! I think you can close the issue