MySQL image build step keeps running

docker
mysql

#1

For some reason, the build step of the MySQL instance keeps running, leading to unjust build times. Our build time indicates 1:07:25 but it’s a lot less. It’s just that the MySQL instance build step keeps on running until it times out.

This is my base CircleCI 2.0 config:

version: 2
jobs:
  build:
    working_directory: /var/www/ci.promoter/current
    docker:
      - image: php:7.1.1
      - image: mysql:5.7.16
        environment:
          MYSQL_DATABASE: testdb
          MYSQL_ROOT_PASSWORD: password
        command:
          mysqld --sql-mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Here’s the log for the MySQL build step:

Initializing database
2017-06-20T10:59:04.413830Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-06-20T10:59:04.413913Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2017-06-20T10:59:04.790834Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-06-20T10:59:04.863577Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-06-20T10:59:04.924758Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 79c9a6b8-55a7-11e7-b301-0242ac170003.
2017-06-20T10:59:04.936799Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-06-20T10:59:04.937285Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2017-06-20T10:59:06.436746Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:06.436812Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:06.436842Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:06.436867Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:06.436976Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
Database initialized
MySQL init process in progress...
2017-06-20T10:59:09.165872Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-06-20T10:59:09.165940Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2017-06-20T10:59:09.167359Z 0 [Note] mysqld (mysqld 5.7.16) starting as process 107 ...
2017-06-20T10:59:09.170692Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-06-20T10:59:09.170752Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-06-20T10:59:09.170770Z 0 [Note] InnoDB: Uses event mutexes
2017-06-20T10:59:09.170787Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-06-20T10:59:09.170810Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-06-20T10:59:09.170827Z 0 [Note] InnoDB: Using Linux native AIO
2017-06-20T10:59:09.171233Z 0 [Note] InnoDB: Number of pools: 1
2017-06-20T10:59:09.171389Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-06-20T10:59:09.175029Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-06-20T10:59:09.186635Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-06-20T10:59:09.192614Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-06-20T10:59:09.206756Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-06-20T10:59:09.217912Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-06-20T10:59:09.218162Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-06-20T10:59:09.270870Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-06-20T10:59:09.271589Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-06-20T10:59:09.271610Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-06-20T10:59:09.272033Z 0 [Note] InnoDB: Waiting for purge to start
2017-06-20T10:59:09.322368Z 0 [Note] InnoDB: 5.7.16 started; log sequence number 2532034
2017-06-20T10:59:09.322663Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2017-06-20T10:59:09.322891Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-06-20T10:59:09.325425Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170620 10:59:09
2017-06-20T10:59:09.328630Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2017-06-20T10:59:09.334625Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:09.334697Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:09.334751Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:09.334795Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:09.338231Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:09.347465Z 0 [Note] Event Scheduler: Loaded 0 events
2017-06-20T10:59:09.347705Z 0 [Note] mysqld: ready for connections.
Version: '5.7.16'  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.
2017-06-20T10:59:12.439662Z 4 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:12.439721Z 4 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:12.439782Z 4 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql: [Warning] Using a password on the command line interface can be insecure.

2017-06-20T10:59:12.451364Z 0 [Note] Giving 0 client threads a chance to die gracefully
2017-06-20T10:59:12.451406Z 0 [Note] Shutting down slave threads
2017-06-20T10:59:12.451427Z 0 [Note] Forcefully disconnecting 0 remaining clients
2017-06-20T10:59:12.451448Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2017-06-20T10:59:12.451561Z 0 [Note] Binlog end
2017-06-20T10:59:12.452636Z 0 [Note] Shutting down plugin 'ngram'
2017-06-20T10:59:12.452666Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2017-06-20T10:59:12.452676Z 0 [Note] Shutting down plugin 'partition'
2017-06-20T10:59:12.452693Z 0 [Note] Shutting down plugin 'ARCHIVE'
2017-06-20T10:59:12.452700Z 0 [Note] Shutting down plugin 'MEMORY'
2017-06-20T10:59:12.452708Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2017-06-20T10:59:12.452715Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-06-20T10:59:12.452724Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2017-06-20T10:59:12.452736Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2017-06-20T10:59:12.452742Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2017-06-20T10:59:12.452748Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2017-06-20T10:59:12.452754Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2017-06-20T10:59:12.452760Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2017-06-20T10:59:12.452778Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2017-06-20T10:59:12.452785Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2017-06-20T10:59:12.452796Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2017-06-20T10:59:12.452806Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2017-06-20T10:59:12.452818Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2017-06-20T10:59:12.452824Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2017-06-20T10:59:12.452830Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2017-06-20T10:59:12.452836Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2017-06-20T10:59:12.452844Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2017-06-20T10:59:12.452850Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2017-06-20T10:59:12.452858Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2017-06-20T10:59:12.452869Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2017-06-20T10:59:12.452903Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2017-06-20T10:59:12.452911Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2017-06-20T10:59:12.452917Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2017-06-20T10:59:12.452923Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2017-06-20T10:59:12.452933Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2017-06-20T10:59:12.452939Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2017-06-20T10:59:12.452953Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2017-06-20T10:59:12.452959Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2017-06-20T10:59:12.452964Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2017-06-20T10:59:12.452970Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2017-06-20T10:59:12.452977Z 0 [Note] Shutting down plugin 'InnoDB'
2017-06-20T10:59:12.453065Z 0 [Note] InnoDB: FTS optimize thread exiting.
2017-06-20T10:59:12.453188Z 0 [Note] InnoDB: Starting shutdown...
2017-06-20T10:59:12.553744Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2017-06-20T10:59:12.555429Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 170620 10:59:12
2017-06-20T10:59:14.352140Z 0 [Note] InnoDB: Shutdown completed; log sequence number 12105240
2017-06-20T10:59:14.361206Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2017-06-20T10:59:14.361274Z 0 [Note] Shutting down plugin 'MyISAM'
2017-06-20T10:59:14.361308Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2017-06-20T10:59:14.361339Z 0 [Note] Shutting down plugin 'CSV'
2017-06-20T10:59:14.361358Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-06-20T10:59:14.361439Z 0 [Note] Shutting down plugin 'sha256_password'
2017-06-20T10:59:14.361461Z 0 [Note] Shutting down plugin 'mysql_native_password'
2017-06-20T10:59:14.361834Z 0 [Note] Shutting down plugin 'binlog'
2017-06-20T10:59:14.369287Z 0 [Note] mysqld: Shutdown complete


MySQL init process done. Ready for start up.

2017-06-20T10:59:14.659161Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-06-20T10:59:14.659258Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2017-06-20T10:59:14.663635Z 0 [Note] mysqld (mysqld 5.7.16) starting as process 7 ...
2017-06-20T10:59:14.669025Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-06-20T10:59:14.669062Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-06-20T10:59:14.669070Z 0 [Note] InnoDB: Uses event mutexes
2017-06-20T10:59:14.669092Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-06-20T10:59:14.669099Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-06-20T10:59:14.669108Z 0 [Note] InnoDB: Using Linux native AIO
2017-06-20T10:59:14.669452Z 0 [Note] InnoDB: Number of pools: 1
2017-06-20T10:59:14.669616Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-06-20T10:59:14.672341Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-06-20T10:59:14.680784Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-06-20T10:59:14.683742Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-06-20T10:59:14.703547Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-06-20T10:59:14.717959Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-06-20T10:59:14.718235Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-06-20T10:59:14.755334Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-06-20T10:59:14.756133Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-06-20T10:59:14.756156Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-06-20T10:59:14.756508Z 0 [Note] InnoDB: Waiting for purge to start
2017-06-20T10:59:14.806751Z 0 [Note] InnoDB: 5.7.16 started; log sequence number 12105240
2017-06-20T10:59:14.807109Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-06-20T10:59:14.809308Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2017-06-20T10:59:14.812265Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2017-06-20T10:59:14.812946Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2017-06-20T10:59:14.812992Z 0 [Note] IPv6 is available.
2017-06-20T10:59:14.813010Z 0 [Note]   - '::' resolves to '::';
2017-06-20T10:59:14.813031Z 0 [Note] Server socket created on IP: '::'.
2017-06-20T10:59:14.813074Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170620 10:59:14
2017-06-20T10:59:14.816830Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:14.816870Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:14.820840Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2017-06-20T10:59:14.825778Z 0 [Note] Event Scheduler: Loaded 0 events
2017-06-20T10:59:14.825953Z 0 [Note] mysqld: ready for connections.
Version: '5.7.16'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
2017-06-20T11:10:44.516009Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4724ms. The settings might not be optimal. (flushed=201 and evicted=0, during the time.)
2017-06-20T11:11:21.018067Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5711ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2017-06-20T11:23:39.647678Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 6357ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2017-06-20T11:46:40.198531Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 7745ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2017-06-20T11:46:55.965454Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5662ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2017-06-20T11:49:01.010389Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4416ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2017-06-20T11:58:21.316397Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5174ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2017-06-20T12:06:11.911441Z 2271 [Note] Aborted connection 2271 to db: '[REDACTED]' user: 'root' host: '127.0.0.1' (Got an error reading communication packets)
2017-06-20T12:06:11.911597Z 2269 [Note] Aborted connection 2269 to db: '[REDACTED]' user: 'root' host: '127.0.0.1' (Got an error reading communication packets)
2017-06-20T12:06:12.059858Z 2268 [Note] Aborted connection 2268 to db: '[REDACTED]' user: 'root' host: '127.0.0.1' (Got an error reading communication packets)

Here are some screenshots of the build step. As you can see, it keeps running.

Anyone knows how to make the build step stop after initialization?


#2

Is there anyone who can help with this?


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.