Greetings.
I'm trying to use fabric to set up a postgresql server with pgbouncer
http://wiki.postgresql.org/wiki/PgBouncer roughly based on these instructions
http://www.askthepony.com/blog/2011/07/django-and-postgresql-improving-the-performance-with-no-effort-and-no-code/.
I have everything working except for actually starting the pgbouncer service.
I have the following line in my fabfile:
sudo("service pgbouncer restart")
The output looks ok:
[ubuntu@host] sudo: service pgbouncer restart
[ubuntu@host] out: * Restarting pgbouncer pgbouncer
[ubuntu@host] out: ...done.
However, after fabric disconnects, pgbouncer is not running. It's log file
reports:
2012-04-02 00:53:56.205 22454 LOG File descriptor limit: 1024 (H:4096),
max_client_conn: 100, max fds possible: 110
2012-04-02 00:53:56.207 22456 LOG listening on 127.0.0.1:6432
2012-04-02 00:53:56.208 22456 LOG listening on
unix:/var/run/postgresql/.s.PGSQL.6432
2012-04-02 00:53:56.208 22456 LOG process up: pgbouncer 1.4.2, libevent
2.0.12-stable (epoll), adns: evdns2
2012-04-02 00:54:03.904 22456 LOG Got SIGINT, shutting down
2012-04-02 00:54:04.233 22456 LOG server connections dropped, exiting
It seems like the service is starting, and then exiting almost immediately due
to receiving a SIGINT.
If I run the command manually from my local shell (without fabric) it works
fine. No immediate shutdown due to SIGINT
ssh -i key.pem ubuntu@host 'sudo service pgbouncer restart'
I can only assume that somehow fabric is sending SIGINT (directly or
indirectly), but I don't know a lot the fabric execution environment or UNIX
signals/daemons in general.
Any ideas?
Thanks,
- Andy_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user