Replies: 1 comment
-
Thanks for your comment. The self-hosting guide have the goal to provide a more or less production-ready setup. Scheduler Healthchecks In summary: Removing stuff often has not only an effect on how many resources are being used, but on how stable or correct an application runs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there,
first of all, thank you for this fantastic project. I enjoy using it. I set it up on a home server and noticed some spikes in the power consumption of this little device:
You can see that I started deploying it (with some troubles unrelated to solidtime) at ~18:00 o'cock. Around 20:45, I was finished and had this "spike-pattern" I had not had before.
Today, I investigated a bit and found that these occur every minute with a more pronounced spike every 10 minutes:
I quickly found that this is caused by this cron job:
solidtime/docker/prod/Dockerfile
Line 127 in 098ead8
That runs each minute. I mitigated that by overwriting this file in my
docker-compose.yml
via a bind mount for thescheduler
:custom-laravel-cron
is a text file just containing*/15 * * * * php /var/www/html/artisan schedule:run --no-interaction
. So I pushed the corn Job from 1 minute > 15 minutes. The result was already pretty good:This removed the spikes every 60 seconds (yay), but now we still have smaller spikes every 30 seconds. These were caused by the health checks that each container runs.
Commenting out these
healthcheck
sections from mydocker-compose.yml
removed these remaining spikes:Now I have a nice, resource-efficient deployment.
I just wanted to share this with others. However, it would be really nice to give the user more control over the job schedules (maybe by using variables in one of the .env files). Overwriting using a bind mount is not that obvious, and I don't know if this causes some unwanted side effects.
Lastly, do you know if these health checks are crucial in the compose file? If not, it may be a good Idea to comment them out or explain their use in the documents.
Again, thanks for this fantastic project.
Beta Was this translation helpful? Give feedback.
All reactions