Content
Updated by Jonatan Zint almost 6 years ago
Hello,
the described issue, on start our openproject docker container
```text
Recreating openproject_openproject_1 ... done
Attaching to openproject_openproject_1
openproject_1 | -----> Database cluster already exists, not modifying.
openproject_1 | Starting PostgreSQL 9.6 database server: main.
openproject_1 | /usr/src/app /usr/src/app
openproject_1 | /usr/src/app
openproject_1 | /usr/src/app /usr/src/app
openproject_1 | Starting memcached: memcached.
openproject_1 | rake aborted!
openproject_1 | PG::ConnectionBad: FATAL: the database system is starting up
openproject_1 | FATAL: the database system is starting up
openproject_1 | /usr/src/app/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `initialize'
openproject_1 | /usr/src/app/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `new'
openproject_1 | /usr/src/app/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `connect'
[...]
```
This actually happens even if we use container images from 8.1 and 8.0, but it first occured after we tried the 8.2 image.
Pretty this is a race condition, rake not waiting for postgres to be initializes.
the described issue, on start our openproject docker container
```text
Recreating openproject_openproject_1 ... done
Attaching to openproject_openproject_1
openproject_1 | -----> Database cluster already exists, not modifying.
openproject_1 | Starting PostgreSQL 9.6 database server: main.
openproject_1 | /usr/src/app /usr/src/app
openproject_1 | /usr/src/app
openproject_1 | /usr/src/app /usr/src/app
openproject_1 | Starting memcached: memcached.
openproject_1 | rake aborted!
openproject_1 | PG::ConnectionBad: FATAL: the database system is starting up
openproject_1 | FATAL: the database system is starting up
openproject_1 | /usr/src/app/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `initialize'
openproject_1 | /usr/src/app/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `new'
openproject_1 | /usr/src/app/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `connect'
[...]
```
This actually happens even if we use container images from 8.1 and 8.0, but it first occured after we tried the 8.2 image.
Pretty this is a race condition, rake not waiting for postgres to be initializes.