Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit CPU Usage On Linux #3140

Open
MannikJ opened this issue Feb 8, 2022 · 2 comments
Open

Limit CPU Usage On Linux #3140

MannikJ opened this issue Feb 8, 2022 · 2 comments

Comments

@MannikJ
Copy link

MannikJ commented Feb 8, 2022

Is there any easy way to set up CPU limits for laradock on linux?

I'm connecting against laradock's workspace container with VSCode's remote development plugin on a linux mint machine. Sometimes it happens that my PHP code produces an infinite loop. Whenever this happens for example whithin phpunit test, my whole system freezes and I need to make a hard reboot.
Is there anything I can do to prevent the laradock container from consuming so many resources?

@gizmola
Copy link

gizmola commented Feb 8, 2022

These sorts of limits are configurable in Docker. See this page on runtime options.

@MannikJ
Copy link
Author

MannikJ commented Feb 11, 2022

Yes, I already found these pages. But excuse my ignorance. May I ask how I can pass those runtime options when using laradock/docker-compose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants