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

Cannot build new mysql 5.7 container #950

Closed
99kennetn opened this issue Feb 23, 2023 · 4 comments
Closed

Cannot build new mysql 5.7 container #950

99kennetn opened this issue Feb 23, 2023 · 4 comments

Comments

@99kennetn
Copy link

99kennetn commented Feb 23, 2023

So i have to run a container with a mysql 5.7 database. But whenever i try to start it, it fills both my memory and my swp file within seconds until the kernel kills it.
It is not an issue with the 8 version but it is not possible for me to upgrade to that for the time being.

When trying to run or build the continer in docker-compose up i get the following error:

Attaching to test-database-1
test-database-1  | 2023-02-23 12:06:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.41-1.el7 started.
test-database-1  | 2023-02-23 12:06:10+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
test-database-1  |        command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.n1IN28K2LL
test-database-1  | 
test-database-1 exited with code 1

and the journalctl gives the following error:

Feb 23 13:06:09 user kernel: [ 121217]     0 121217  4214833  2977447 27885568   476762             0 mysqld
Feb 23 13:06:09 user kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=docker-f192a78e27dead8419db6d893ed1f12f6e4c531749bdcf88879ce6f446c3321e.scope,mems_allowed=0,global_oom,task_memcg=/system.slice/docker-f192a78e27dead8419db6d893ed1f12f6e4c531749bdcf88879ce6f446c3321e.scope,task=mysqld,pid=121217,uid=0
Feb 23 13:06:09 user kernel: Out of memory: Killed process 121217 (mysqld) total-vm:16859332kB, anon-rss:11909784kB, file-rss:4kB, shmem-rss:0kB, UID:0 pgtables:27232kB oom_score_adj:0
Feb 23 13:06:09 user systemd[1]: docker-f192a78e27dead8419db6d893ed1f12f6e4c531749bdcf88879ce6f446c3321e.scope: A process of this unit has been killed by the OOM killer.
Feb 23 13:06:10 user systemd[1]: docker-f192a78e27dead8419db6d893ed1f12f6e4c531749bdcf88879ce6f446c3321e.scope: Deactivated successfully.

the docker-compose.yml file to replicate:

version: '2.1'
services:
  database:
    platform: linux/x86_64
    image: mysql:5.7       
    volumes:
      - /var/lib/mysql
    environment:
      - "MYSQL_ROOT_PASSWORD=root"
      - "MYSQL_DATABASE=test"
    ports:
      - "33062:3306"
volumes:
  data:

I have tried uninstalling both docker-compose and docker, removed all my containers, cleared all caches, build without cache and pruned all containers in docker.

I am using Docker version 23.0.1
Docker Compose version 2.16.0
and
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=22.0.4
DISTRIB_CODENAME=Sikaris
DISTRIB_DESCRIPTION="Manjaro Linux"

The above information is every error i have been able to find related to the problem.

This bug is making it almost impossible to do my job, so i hope someone can help me to get it to work.

@99kennetn
Copy link
Author

Something as simple as running just

docker run mysql:5.7

creates the error.
I tested it on another manjro installation and on the steam deck and no problem was found there.

I cannot wait, so unforturnelty i have to reinstall my system as i cannot wait for the issue to be solved.

@yosifkit
Copy link
Member

A shot in the dark, but sounds like a duplicate of #579; perhaps setting some ulimits would work?

@tianon
Copy link
Member

tianon commented Feb 24, 2023

Unfortunately, we do not have the bandwidth to provide in-depth integration/deployment/environment debugging or support here; these sorts of questions/requests would be more appropriately posted to a dedicated support forum, such as the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow.

@tianon tianon closed this as completed Feb 24, 2023
@sentriz

This comment was marked as off-topic.

@docker-library docker-library locked as resolved and limited conversation to collaborators Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants