Thanks for the update. I haven't looked at Kamal in much detail, but it looks like a wrapper around Docker.
I use Docker and Compose a lot, and assuming Kamal allows you to pass through extra options, you should be able to throttle the CPU/memory to keep a process from running away with your droplet. That might be worth in case you keep seeing spikes. It won't limit the appearance of downtime for that service, but it'll keep the box and other containers running.
Also, if you aren't running DO's managed databases, please save yourself some grief and do that vs. trying to run it in Docker.
100% using managed databases. Don't trust myself to run those myself haha. At least with the web server, I know I can just nuke it and reset it with a few commands without any data loss.
And yes, Kamal lets you configure resources limits using Docker's config. I think it's called cap ? I haven't looked into it yet, but it seems like a good idea. So maybe set each container to use a maximum of 80% CPU usage, just so it never takes down the full machine? (assuming the other containers don't use up the remaining 20% at the same time)
I have never used cap but I have used resources with limits + reservations via compose which should just be passing those through as cli options: docs.docker.com/compose/compo… - I would ChatGPT this to see what args are 🤣
80% of 90% should be good enough to keep control of the box. I'm lazy and I have two or three dozen containers running without issues on a 4 GB droplet. Worse case, you can narrow it down to the service.
Thanks for the update. I haven't looked at Kamal in much detail, but it looks like a wrapper around Docker.
I use Docker and Compose a lot, and assuming Kamal allows you to pass through extra options, you should be able to throttle the CPU/memory to keep a process from running away with your droplet. That might be worth in case you keep seeing spikes. It won't limit the appearance of downtime for that service, but it'll keep the box and other containers running.
Also, if you aren't running DO's managed databases, please save yourself some grief and do that vs. trying to run it in Docker.
100% using managed databases. Don't trust myself to run those myself haha. At least with the web server, I know I can just nuke it and reset it with a few commands without any data loss.
And yes, Kamal lets you configure resources limits using Docker's config. I think it's called
cap? I haven't looked into it yet, but it seems like a good idea. So maybe set each container to use a maximum of 80% CPU usage, just so it never takes down the full machine? (assuming the other containers don't use up the remaining 20% at the same time)I have never used
capbut I have used resources withlimits+reservationsvia compose which should just be passing those through as cli options: docs.docker.com/compose/compo… - I would ChatGPT this to see what args are 🤣80% of 90% should be good enough to keep control of the box. I'm lazy and I have two or three dozen containers running without issues on a 4 GB droplet. Worse case, you can narrow it down to the service.