DarthSim / overmind

Process manager for Procfile-based applications and tmux
MIT License
2.84k stars 79 forks source link

Start postgresql bug #60

Closed ricardopacheco closed 4 years ago

ricardopacheco commented 4 years ago

Procfile

db: pg_ctl --wait start

Overmind log:

system  | Tmux socket name: overmind-newapp-2SrzUu-JLlMRPhDnShgXKs
system  | Tmux session ID: newapp
system  | Listening at /Users/workstation/projects/newapp/tmp/sockets/.overmind.sock
db      | Started with pid 86389...
db      | waiting for server to start....2019-10-08 02:24:46.119 -03 [86506] LOG:  starting PostgreSQL 12.0 on x86_64-apple-darwin18.0.0, compiled by Apple LLVM version 10.0.0 (clang-1000.11.45.5), 64-bit
db      | 2019-10-08 02:24:46.121 -03 [86506] LOG:  listening on IPv6 address "::1", port 5432
db      | 2019-10-08 02:24:46.121 -03 [86506] LOG:  listening on IPv4 address "127.0.0.1", port 5432
db      | 2019-10-08 02:24:46.121 -03 [86506] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
db      | 2019-10-08 02:24:46.132 -03 [86507] LOG:  database system was shut down at 2019-10-08 02:24:28 -03
db      | 2019-10-08 02:24:46.135 -03 [86506] LOG:  database system is ready to accept connections
db      |  done
db      | server started
db      | Exited

The postgres process was started perfectly, but, for some reason, overmind is closed automatically. Overmind closes, but, postgres continues running.

Config

iTerm2
Zsh
Mojave 10.14
Postgres 12.0 with asdf install (https://github.com/smashedtoatoms/asdf-postgres)
Overmind 2.0.3 (installed by brew)
DarthSim commented 4 years ago

Hi,

It's not a bug but expected behavior. pg_ctl --wait start starts PostgreSQL daemon and exits, so Overmind expectedly finishes all other processes from the Procfile and exits too. If you're going to start a PG server from Overmind, you don't need it to be daemonized. Just use postgres directly without pg_ctl.

ricardopacheco commented 4 years ago

Hi,

Yea, it`s works. Before i update postgres to 12.0 this never happened (i start with pg_ctl start and overmind not exited). Works now, thanks!