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

MySQL:8.0 is taking unusual time to Initialize #401

Closed
the-redback opened this issue Apr 9, 2018 · 3 comments
Closed

MySQL:8.0 is taking unusual time to Initialize #401

the-redback opened this issue Apr 9, 2018 · 3 comments

Comments

@the-redback
Copy link

mysql:8.0 (aka 8.0.4) is taking unusual time (approximately 10+ minutes) to initialize in docker (local machine).

If you look closely at log's time, the last line took 7 minutes to execute.

Initializing database
2018-04-09T10:00:29.926078Z 0 [Warning] [MY-011070] Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it is deprecated and will be removed in a future release.
2018-04-09T10:00:29.926165Z 0 [System] [MY-010116] /usr/sbin/mysqld (mysqld 8.0.4-rc) starting as process 30 ...
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
2018-04-09T10:00:46.842725Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed.
2018-04-09T10:00:46.903128Z 5 [Warning] [MY-010453] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2018-04-09T10:07:28.643932Z 5 [Warning] [MY-010315] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.

For your Information, in this same machine, mysql:8.0.3 doesn't take much time at all to Initialize the Database.

Here is my configuration:

OS: ubuntu 16.04

$ docker version
Client:
 Version:	17.12.1-ce
 API version:	1.35
 Go version:	go1.9.4
 Git commit:	7390fc6
 Built:	Tue Feb 27 22:17:40 2018
 OS/Arch:	linux/amd64

Server:
 Engine:
  Version:	17.12.1-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.4
  Git commit:	7390fc6
  Built:	Tue Feb 27 22:16:13 2018
  OS/Arch:	linux/amd64
  Experimental:	false

Process to recreate and full log:

$ docker pull mysql:8.0
8.0: Pulling from library/mysql
2a72cbf407d6: Pull complete 
38680a9b47a8: Pull complete 
4c732aa0eb1b: Pull complete 
c5317a34eddd: Pull complete 
f92be680366c: Pull complete 
e8ecd8bec5ab: Pull complete 
2a650284a6a8: Pull complete 
5127cdce4b46: Pull complete 
e20139ed3159: Pull complete 
4c9ba8a8a3da: Pull complete 
16cd0f3afb27: Pull complete 
0e4872d58e1f: Pull complete 
Digest: sha256:7004063f8bd0c7bade8d1c526b9b8f5188c8288f411d76ee4ba83131e00c6f02
Status: Downloaded newer image for mysql:8.0

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:8.0
b9c5d67233743dc085c50244526f5b12bd862cd50cdc0cb889b2dc549c4a396d

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
b9c5d6723374        mysql:8.0           "docker-entrypoint.s…"   5 seconds ago       Up 3 seconds        3306/tcp            some-mysql

$ docker logs -f b9c5d6723374
Initializing database
2018-04-09T10:00:29.926078Z 0 [Warning] [MY-011070] Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it is deprecated and will be removed in a future release.
2018-04-09T10:00:29.926165Z 0 [System] [MY-010116] /usr/sbin/mysqld (mysqld 8.0.4-rc) starting as process 30 ...
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
2018-04-09T10:00:46.842725Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed.
2018-04-09T10:00:46.903128Z 5 [Warning] [MY-010453] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2018-04-09T10:07:28.643932Z 5 [Warning] [MY-010315] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:28.644008Z 5 [Warning] [MY-010315] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:28.644033Z 5 [Warning] [MY-010315] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:28.644051Z 5 [Warning] [MY-010315] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:28.644082Z 5 [Warning] [MY-010323] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:28.644094Z 5 [Warning] [MY-010323] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:28.644112Z 5 [Warning] [MY-010311] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:28.644240Z 5 [Warning] [MY-010330] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:28.644257Z 5 [Warning] [MY-010330] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
Database initialized
MySQL init process in progress...
2018-04-09T10:07:44.797619Z 0 [Warning] [MY-011070] Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it is deprecated and will be removed in a future release.
2018-04-09T10:07:44.797712Z 0 [System] [MY-010116] /usr/sbin/mysqld (mysqld 8.0.4-rc-log) starting as process 64 ...
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
MySQL init process in progress...
2018-04-09T10:07:45.990317Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed.
2018-04-09T10:07:46.040103Z 0 [Warning] [MY-000000] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2018-04-09T10:07:46.046970Z 0 [Warning] [MY-010315] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.047013Z 0 [Warning] [MY-010315] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.047029Z 0 [Warning] [MY-010315] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.047046Z 0 [Warning] [MY-010315] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.047078Z 0 [Warning] [MY-010323] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.047091Z 0 [Warning] [MY-010323] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.047107Z 0 [Warning] [MY-010311] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.050079Z 0 [Warning] [MY-010330] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.050115Z 0 [Warning] [MY-010330] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:46.058044Z 0 [System] [MY-010931] /usr/sbin/mysqld: ready for connections. Version: '8.0.4-rc-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server (GPL).
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
2018-04-09T10:07:50.304129Z 9 [Warning] [MY-010315] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:50.304156Z 9 [Warning] [MY-010315] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:50.304166Z 9 [Warning] [MY-010315] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:50.304175Z 9 [Warning] [MY-010315] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:50.304197Z 9 [Warning] [MY-010323] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:50.304207Z 9 [Warning] [MY-010323] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:50.304218Z 9 [Warning] [MY-010311] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:50.304321Z 9 [Warning] [MY-010330] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:50.304332Z 9 [Warning] [MY-010330] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.

2018-04-09T10:07:53.074527Z 0 [System] [MY-010910] /usr/sbin/mysqld: Shutdown complete.

MySQL init process done. Ready for start up.

2018-04-09T10:07:53.336773Z 0 [Warning] [MY-011070] Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it is deprecated and will be removed in a future release.
2018-04-09T10:07:53.336883Z 0 [System] [MY-010116] /usr/sbin/mysqld (mysqld 8.0.4-rc-log) starting as process 1 ...
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
2018-04-09T10:07:54.704270Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed.
2018-04-09T10:07:54.833645Z 0 [Warning] [MY-000000] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2018-04-09T10:07:54.841847Z 0 [Warning] [MY-010315] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.841879Z 0 [Warning] [MY-010315] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.841894Z 0 [Warning] [MY-010315] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.841908Z 0 [Warning] [MY-010315] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.841931Z 0 [Warning] [MY-010323] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.841940Z 0 [Warning] [MY-010323] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.841953Z 0 [Warning] [MY-010311] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.844864Z 0 [Warning] [MY-010330] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.844947Z 0 [Warning] [MY-010330] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-04-09T10:07:54.850382Z 0 [System] [MY-010931] /usr/sbin/mysqld: ready for connections. Version: '8.0.4-rc-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL).
@the-redback
Copy link
Author

the-redback commented Apr 9, 2018

cc: @tamalsaha @yosifkit

@the-redback the-redback changed the title MySQL:8.0 taking unusual time to Initialize MySQL:8.0 is taking unusual time to Initialize Apr 9, 2018
@TimWolla TimWolla mentioned this issue Apr 19, 2018
@tianon
Copy link
Member

tianon commented Apr 20, 2018

This looks like it's probably related to NUMA and seccomp; see #303. I imagine it'll probably be more performant if you provide an appropriate seccomp profile which allows NUMA operations, as discussed over in that issue. 👍

Since there isn't really anything we can do to fix the image here, I'm going to close. In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow. Thanks!

@tianon tianon closed this as completed Apr 20, 2018
@the-redback
Copy link
Author

Looks like, it was an issue of slow storage. After upgrading my disk to SSD, the waiting time improved drastically.

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

No branches or pull requests

2 participants