Docker container fails to start PostgreSQL
I have a lot of PostgreSQL errors and it's resulting in a 500
on boot of the container.
gitlab-ce-1 | 2015-06-18T20:11:52.977387208Z 2015-06-18_20:11:52.19799 [417] 18 Jun 20:11:52.197 * Background saving started by pid 4675
gitlab-ce-1 | 2015-06-18T20:11:52.977387208Z 2015-06-18_20:11:52.30184 [4675] 18 Jun 20:11:52.301 * DB saved on disk
gitlab-ce-1 | 2015-06-18T20:11:52.977387208Z 2015-06-18_20:11:52.30258 [4675] 18 Jun 20:11:52.302 * RDB: 0 MB of memory used by copy-on-write
gitlab-ce-1 | 2015-06-18T20:11:52.977387208Z 2015-06-18_20:11:52.39878 [417] 18 Jun 20:11:52.398 * Background saving terminated with success
gitlab-ce-1 | 2015-06-18T20:11:53.978300521Z
gitlab-ce-1 | 2015-06-18T20:11:53.978300521Z ==> /var/log/gitlab/postgresql/current <==
gitlab-ce-1 | 2015-06-18T20:11:53.978300521Z 2015-06-18_20:11:53.53570 FATAL: could not create shared memory segment: Invalid argument
gitlab-ce-1 | 2015-06-18T20:11:53.978300521Z 2015-06-18_20:11:53.53574 DETAIL: Failed system call was shmget(key=5432001, size=145629184, 03600).
gitlab-ce-1 | 2015-06-18T20:11:53.978300521Z 2015-06-18_20:11:53.53574 HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 145629184 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
gitlab-ce-1 | 2015-06-18T20:11:53.978300521Z 2015-06-18_20:11:53.53575 If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
gitlab-ce-1 | 2015-06-18T20:11:53.978300521Z 2015-06-18_20:11:53.53576 The PostgreSQL documentation contains more information about shared memory configuration.