Skip to content

Instantly share code, notes, and snippets.

@jaytaylor
Created April 4, 2013 00:08
Show Gist options
  • Select an option

  • Save jaytaylor/5306595 to your computer and use it in GitHub Desktop.

Select an option

Save jaytaylor/5306595 to your computer and use it in GitHub Desktop.
Stunnel and PgBouncer upstart scripts for Ubuntu 12.04 "Precise"
# PgBouncer Upstart script
description "pgbouncer"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
respawn
respawn limit 10 30
exec sudo -uubuntu /usr/local/bin/pgbouncer /etc/pgbouncer.ini
# Stunnel Upstart script
description "stunnel"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
respawn
respawn limit 10 30
exec /usr/local/bin/stunnel /etc/stunnel/stunnel.conf
Copy link

ghost commented Jul 29, 2014

Did you change the pidfile entry in pgbouncer.ini?

I am getting:
2014-07-29 02:40:27.041 968 FATAL @src/main.c:553 in function write_pidfile(): /var/run/postgresql/pgbouncer.pid: No such file or directory [2]

(starting with 'sudo service pgbouncer start' manually works).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment