has been set to 'forking'
Removing the "-n" value assigned to OPTS variable in pgpool.sysconfig.
The problem was the systemd service with Type=forking expects the parent process
to exit after the startup is complete, but because the -n command line option
disables the daemon mode and systemd keeps on waiting for the Pgpool-II's parent
process to exit after startup, which never happens and eventually systemd
terminate the Pgpool-II after timeout.
As part of this commit I have also added a new variable STOP_OPTS which is
passed to ExecStop and can be used to pass extra command line options to
Pgpool-II stop command.
EnvironmentFile=-/etc/sysconfig/pgpool
ExecStart=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $OPTS
-ExecStop=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf stop
+ExecStop=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf $STOP_OPTS stop
ExecReload=/usr/bin/pgpool -f /etc/pgpool-II/pgpool.conf reload
[Install]
# Options for pgpool
-# -n: don't run in daemon mode. does not detatch control tty
-# -d: debug mode. lots of debug information will be printed
+# If you want to use '-n' in START_OPTS, change the service type to simple in
+# the Pgpool-II service configuration file
+#OPTS=" -d"
-#OPTS=" -d -n"
-OPTS=" -n"
+#STOP_OPTS=" -m fast"