antoniodipinto / ikisocket

🧬 WebSocket wrapper with event management for Fiber https://github.com/gofiber/fiber. Based on Fiber WebSocket and inspired by Socket.io
MIT License
123 stars 21 forks source link

Please Help - High CPU Usage #25

Closed talksik closed 1 year ago

talksik commented 2 years ago

Sorry to keep bugging you for such a great package and some great work for an open source package @antoniodipinto

For some reason, there are spikes and plateaus in CPU usage.

Below is the digitalocean app platform insights. I have only one user connection, and there seems to be spikes and then just stays there. Memory is fine and stable. This is when there are websocket connections from one or two clients, but maybe there is no cleanup of some loop?

Screen Shot 2022-09-12 at 1 24 06 PM image
antoniodipinto commented 2 years ago

Hi @talksik the only real loop that is always running is the 'read' loop that accepts incoming messages. My question here is what happens after the WebSocket spawned the messages? Do you have any database involved? Any other places where the app can load data?

I'm asking because I didn't experienced any issue like that in the past and I'm curios to understand what's going on

antoniodipinto commented 1 year ago

Closed for inactivity