Clean up PGBouncer PID when using gitlab-ctl stop, restart
Description
As described by customer:
I was looking at the pgbouncer log. I agree it looks like the pgbouncer didn’t clean up, but I think it also might have to do with it not being shutdown properly (server was rebooted). I found the pid after going through the rb file, so we were able to get it back to stable, which was the original issue for opening the ticket.
I do think, that some cleanup of the pid could be done if you do an actual Gitlab-ctl stop command, but I don’t know if it requires high priority??
Proposal
Clean-up Pgbouncer PID when using gitlab-ctl stop and restart to ensure rapid recovery when a server shuts down uncleanly.
Alternatively we could write the location of the pgbouncer pid file to the log so it can be easily located.
Links / references
Edited by Adam Mulvany