Ushahid docker compose error with mysql


#1

Hello
I’m getting alot of errors related to docker build using docker-compose file for ushihid
the errors are related to mysql innodb memory i went to etc mysql.cnf added changed the configs added mem_limit to the docker compose still getting the same error any advise ?

I’m running a digital ocean droplet with 1 GB ram and 1vcpu

2019-01-11 08:43:31 0 [Note] mysqld (mysqld 5.6.42) starting as process 1 ...
2019-01-11 08:43:31 1 [Note] Plugin 'FEDERATED' is disabled.
2019-01-11 08:43:34 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
2019-01-11 08:43:34 1 [Note] InnoDB: The InnoDB memory heap is disabled
2019-01-11 08:43:34 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-01-11 08:43:34 1 [Note] InnoDB: Memory barrier is not used
2019-01-11 08:43:34 1 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-01-11 08:43:34 1 [Note] InnoDB: Using Linux native AIO
2019-01-11 08:43:34 1 [Note] InnoDB: Using CPU crc32 instructions
2019-01-11 08:43:34 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
2019-01-11 08:43:34 1 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
2019-01-11 08:43:35 1 [ERROR] Plugin 'InnoDB' init function returned error.
2019-01-11 08:43:35 1 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-01-11 08:43:36 1 [ERROR] Unknown/unsupported storage engine: InnoDB
2019-01-11 08:43:36 1 [ERROR] Aborting

2019-01-11 08:43:36 1 [Note] Binlog end
2019-01-11 08:43:37 1 [Note] Shutting down plugin 'partition'
2019-01-11 08:43:37 1 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'


#2

Hi,

1 GB may be a bit on the tight side for running everything required.

You can try to configure mysqld to request less memory , a bit like it’s done here: https://github.com/ushahidi/platform-release/blob/3711513deb8dfe05a0cf97ad6b37564936c83e2e/docker/mysql/Dockerfile

Note how a custom my.cnf is provided

hope this helps!


#3

yes this is resolved by adjusting the RAM size however we seeing a different error
sql database not accessible or can not connecto the database