Guys hi,
I am using Ubuntu Docker 17.12.0ce on 16.04 and have php app running.
It has 2 containers: prj_apache_1 and prj1_mysql_1
Problem is that mysql container is frequently crushing. Solution is to add swap space. But most of explanation are for “regular” server not dockerized.
I do not have root@myserver:~#,
i have root@docker-s-1vcpu-1gb-nyc3-01:~#,
also i can “get in” apache using docker exec -ti prj_apache_1 bash
and mysql docker exec -ti prj_mysql_1 bash
so my question inside which containers do i run this commands: https://www.digitalocean.com/community/questions/mysql-server-stops-very-frequently?comment=42488 ?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey friend!
Docker is going to use the host memory/swap, so you can just add swap to the VM or increase memory. Note that swap is kind of a bad thing if you’re frequently going OOM. You want swap to do less important things than frequently act on behalf of memory missing and needed. Increasing memory in the VM or further optimizing the MySQL configuration (or even the app that is using MySQL) will continue to be superior solutions.
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.