coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Feature]: App-level Resourse Limit

Open chez14 opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Summary

I noticed that there are no App-level resource limit. I.e RAM Limit to 300MB instead of allow to run them to use full memory.

Why should this be worked on?

Some of apps may run into memory leak, or even suddenly uses a large amount of memory due to DDoS attack, or even somehow it just bloats for no reason.

With app-level resource limit, we can make sure that this app will not take down the whole machine when the app suddenly uses a lot of memory that leaves nobody enough memory to run properly.

As far as I'm aware, Docker accepts Resource Limit options on run: https://docs.docker.com/config/containers/resource_constraints/.

chez14 avatar Jan 20 '23 13:01 chez14

Couldn't you just modify it in your docker compose file? But I suppose for other applications it would be a nice option

simonorzel26 avatar Jan 23 '23 16:01 simonorzel26

Hi @simonorzel26,

Couldn't you just modify it in your docker compose file? But I suppose for other applications it would be a nice option

Hmm, I haven't tried deploying with Docker Compose at the moment, I deployed using the "Integrated Git App", in which, it build from Docker file in the project (not docker compose), or you can pick up a docker image from provided template (in my case, webdevops/php-apache). This solution offers me automatic deployment, the first reason why I tried Coolify!

In those cases, there are no settings to configure those (screenshot attached), even tough the Memory Limit displayed properly on the Monitor tab.

Also, thinking about the use case you offered (and slightly modified), I think by adding docker-compose.yml file to git, I don't feel really good about it. Prod and Dev are two different separate environments, so fine tuning the resource limit in Dev actually will not scale well in Prod or staging, especially when large data or traffic to be expected. Hence, the ability to fine-tune things on the fly is required to be done directly in the environment. I hope I got your idea correctly, let me know if you mean the other way.

Thank you!


Screenshots

Configuration Tab

image

image

Monitor Tab

image

chez14 avatar Jan 23 '23 22:01 chez14

It is available in v4.

I'm closing this issue, because tracking features will be moved to GitHub discussions. Github issues will be only for bugs.

Version 4 is in full focus. v3 related issues will be closed, if it is not a critical bug.

Thanks for your understanding.

andrasbacsai avatar Sep 08 '23 09:09 andrasbacsai