Skip to main content

Docker Success Center

The Docker enterprise customer portal.

Docker, Inc.

Docker Cloud - Fail to Deploy MySQL Service

When trying to deploy a MySQL service using Docker Cloud, if the service dies immediately after deploying, it is usually because you are trying to deploy the MySQL service on a node with less than 1GB of memory.

If we analyze the logs generated by the MySQL service, they will reveal the following error message:

nwm-mysql-1 | 2016-03-22T10:42:51.147069884Z 2016-03-22T10:42:51.147000Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 
nwm-mysql-1 | 2016-03-22T10:42:51.147101713Z 2016-03-22T10:42:51.147059Z 0 [ERROR] InnoDB: mmap(137428992 bytes) failed; errno 12 
nwm-mysql-1 | 2016-03-22T10:42:51.147123744Z 2016-03-22T10:42:51.147093Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool 
nwm-mysql-1 | 2016-03-22T10:42:51.147158043Z 2016-03-22T10:42:51.147117Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 
nwm-mysql-1 | 2016-03-22T10:42:51.147186160Z 2016-03-22T10:42:51.147141Z 0 [ERROR] Plugin 'InnoDB' init function returned error. 
nwm-mysql-1 | 2016-03-22T10:42:51.147204158Z 2016-03-22T10:42:51.147178Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
nwm-mysql-1 | 2016-03-22T10:42:51.147218629Z 2016-03-22T10:42:51.147198Z 0 [ERROR] Failed to initialize plugins. 
nwm-mysql-1 | 2016-03-22T10:42:51.147240174Z 2016-03-22T10:42:51.147212Z 0 [ERROR] Aborting 
nwm-mysql-1 | 2016-03-22T10:42:51.147245062Z 
nwm-mysql-1 | 2016-03-22T10:42:51.147300470Z 2016-03-22T10:42:51.147233Z 0 [Note] Binlog end 
nwm-mysql-1 | 2016-03-22T10:42:51.147345261Z 2016-03-22T10:42:51.147291Z 0 [Note] Shutting down plugin 'MyISAM' 
nwm-mysql-1 | 2016-03-22T10:42:51.147363749Z 2016-03-22T10:42:51.147337Z 0 [Note] Shutting down plugin 'CSV' 
nwm-mysql-1 | 2016-03-22T10:42:51.147699369Z 2016-03-22T10:42:51.147357Z 0 [Note] Shutting down plugin 'keyring_file' 
nwm-mysql-1 | 2016-03-22T10:42:51.148416184Z 2016-03-22T10:42:51.148295Z 0 [Note] mysqld: Shutdown complete 
nwm-mysql-1 | 2016-03-22T10:42:51.148426802Z

A closer look at the log above, we will see the following line:

nwm-mysql-1 | 2016-03-22T10:42:51.147123744Z 2016-03-22T10:42:51.147093Z 0 [ERROR] InnoDB: Cannot allocate memory for the buffer pool 

Resolution

To fix the issue, you will need to launch a bigger node with 1GB of memory or more.

  • Was this article helpful?