Casvt / MIND

A simple self hosted reminder application that can send push notifications to your device. Set the reminder and forget about it!
https://casvt.github.io/MIND/
GNU General Public License v3.0
201 stars 10 forks source link

High CPU Load #41

Closed rauschgiftengel closed 1 year ago

rauschgiftengel commented 1 year ago

Description of the bug Have a high CPU load on my docker host. See screenshot. Running via latest docker on latest Ubunto. Self compiled via cloning your repo.

To Reproduce

Run the container - high load. Stop the container - load gone

Expected behaviour no high load ;)

Screenshots

image

Version info

Additional context

Casvt commented 1 year ago

We offer our own docker container first of all: mrcas/mind:latest.

Secondly, with this amount of information, I won't be able to fix it. Is it constant? Or only at startup? Can you use the web-ui while this happens? Does it have this kind of usage when there are no reminders in your library?

rauschgiftengel commented 1 year ago

Hey Casvt,

sorry for the lack of information: with your input i´ve tested again - with the provided docker container everything is working fine, no more high cpu load.

To answer your questions (for the self builded version): The high load was constantly, no matter if theres a job or not. web-ui was useable all the time.

But i´ll use the provided container from now on ;)

bosam commented 1 year ago

Sorry to re-open this one, but I'm in a scenario where as soon as it has to send a notification it goes 100% CPU usage and never goes back to 0.

Situation:

Additional information:

On top of that, I am only receiving one notification out of the 3 I set up.

I don't know what else to add to this issue since docker logs -f mind does not really have a lot to show.

Portainer screenshot of activity: image

Casvt commented 1 year ago

I've released a new version of MIND, V1.2.1, which fixes a bug with repeated reminders. Maybe, the bug that has now been fixed has been causing this high cpu load? Please pull the new docker image (mrcas/mind:latest) and check if the problem still persists.

You say that the load starts when the notification gets sent. So there is some sort of bug in the code for sending the notification.

  1. Seeing that the repeated reminders bug was present in the code for sending the notification (the new timestamp needed to be calculated), that could be the source. That has been fixed in the new version so if the new version doesn't peak, that was the problem.
  2. You say that you only receive one of three notifications. If the container is completely frozen because of the 100% usage, it can't do anything anymore, including sending notifications (the two missing ones).

The docker logs don't show anything because proper logging hasn't been added yet (I should).

bosam commented 1 year ago

The new version fixed it! Thank you 😁 I have retried all my scenarii and they are successful this time, I have my 3 notifications apart and no more 100% high-load CPU.

Thank you for the explanation and for the quick fix. Ticket can officially be closed now 👍