Mysql:5.7 docker image breaks the system

Good morning,
I’ve tried to run MySQL 5.7 image on my laptop, but it breaks the system. The RAM/CPU is increased exponentially and I can’t use the system forcing me to reboot it.

I thought it was a CPU or motherboard possible problem, however, when I ran this image over a 2018 laptop same happened.

When I saw dmesg output, I got this one:

[136131.421962] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/system.slice/docker-319cd07dd6fcd96dd3984a9c6b37eccd5f2f589c3f231f105bb4105622a8acf0.scope,task=mysqld,pid=874860,uid=0

[136131.421991] Out of memory: Killed process 874860 (mysqld) total-vm:16859328kB, anon-rss:11693008kB, file-rss:4kB, shmem-rss:0kB, UID:0 pgtables:23080kB oom_score_adj:0

The command to run is this one:

docker run -d MySQL:5.7

Systems:
SO: Fedora Linux 37 (Workstation Edition) x86_64
Laptop model: HP ProBook 440 G8 Notebook PC
Kernel: 6.0.11-300.fc37.x86_64
CPU: 11th Gen Intel i7-1165G7 (8) @ 4.700GHz
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics]
RAM: 16GB
Docker version: 20.10.21

SO: Fedora Linux 37 (Workstation Edition) x86_64
Laptop model: Gigabyte Sabre 15
Kernel: 6.0.11-300.fc37.x86_64
CPU: Intel i7-7700HQ (8) @ 3.8000GHz
GPU: Intel HD Graphics 630
GPU: NVIDIA GeForce GTX 1050 Mobile
RAM: 16GB
Docker version: 20.10.21

I would like to create a bug report for this image but I don’t know how to do it.

NOTE: It does not happen with the latest image.

It would exit immediately.Is this really the command you run?

I thought it is a system problem. It does not happen with Archlinux. It would help if you defined ulimits in docker-compose.yml like this:

mysql:
  image: mysql:5.7
  ulimits:
    nofile:
      soft: "65536"
      hard: "65536"
1 Like

Are you saying it helped you to make it work again?

Just to clarify why I wrote my previous reply, the MySQL container requires environment variables when you run it for the first time without an already initialized MySQL data folder.
Your compose example still doesnt have that variable and no volume is defined.

To avoid misunderstanding, please share the exact commands or compose configuration that you used. Without passwords of course.

I don’t know why, but this worked for me.

Could you explain?