From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Nicola Contu <nicola.contu@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Pgbouncer and postgres
Date: Mon, 17 Sep 2018 07:11:47 -0700
Message-ID: <6d2f155c-4bd4-14d8-bbf2-506617c9462a@aklaver.com> (raw)
In-Reply-To: <CAMTZZh1gzKiwDuZg9mmhMsrCZPJjN-fEtDpwcOtWzw09=cys4w@mail.gmail.com>
References: <CAMTZZh3r06EkwdL6W58i3ODSohZV__Rf3uBktXLfKOhxPuU8oA@mail.gmail.com>
<7bceb23a-8724-7fd9-bf74-e5dfd557283e@aklaver.com>
<CAMTZZh1gzKiwDuZg9mmhMsrCZPJjN-fEtDpwcOtWzw09=cys4w@mail.gmail.com>
On 9/17/18 7:05 AM, Nicola Contu wrote:
> The log is from pgbouncer.
>
> I installed updates after this problem, but they did not resolve anything.
I was thinking more of updates that where done between the last time it
worked and the time it started failing.
Along that line, when was the last time it worked?
>
> I compiled 1.9.0 from source on the same path of the previous one. Then
> back to 1.8.1 on the same path.
>
> I also tried changing the listening port on pgbouncer, but that does not
> change too much.
Yeah, your log shows the port/socket coming up:
2018-09-17 12:21:14.422 88424 LOG listening on 127.0.0.1:6543
2018-09-17 12:21:14.422 88424 DEBUG add_listen: unix:/tmp/.s.PGSQL.6543
2018-09-17 12:21:14.422 88424 LOG listening on unix:/tmp/.s.PGSQL.6543
2018-09-17 12:21:14.423 88424 LOG process up: pgbouncer 1.8.1, libevent
2.0.21-stable (epoll), adns: evdns2, tls: OpenSSL 1.0.2k-fips 26 Jan 2017
> I can connect via telnet on that port, but we I try with anything else
> (like Apache) it makes pgbouncer crashing.
Are there log entries from that?
>
>
> Il giorno lun 17 set 2018 alle ore 15:44 Adrian Klaver
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> ha scritto:
>
> On 9/17/18 5:33 AM, Nicola Contu wrote:
> > Hello,
> >
> > I'm trying to get pgbouncer working but I'm getting this error :
> >
> >
>
> What is generating the log below?
>
> To me it looks like everything is on track until this:
>
> > 2018-09-17 12:21:48.917 88424 WARNING tune_socket(13) failed:
> Operation
> > not supported
> > 2018-09-17 12:21:48.917 88424 NOISE safe_close(13) = 0
> > 2018-09-17 12:21:48.918 88424 NOISE safe_accept(12) = Resource
> > temporarily unavailable
> > 2018-09-17 12:22:14.422 88424 LOG Stats: 0 xacts/s, 0 queries/s,
> in 0
> > B/s, out 0 B/s, xact 0 us, query 0 us wait time 0 us
> > 2018-09-17 12:23:14.423 88424 LOG Stats: 0 xacts/s, 0 queries/s,
> in 0
> > B/s, out 0 B/s, xact 0 us, query 0 us wait time 0 us
> > 2018-09-17 12:23:26.561 88424 LOG Got SIGINT, shutting down
> > 2018-09-17 12:23:26.872 88424 LOG server connections dropped, exiting
> > 2018-09-17 12:23:26.872 88424 NOISE safe_close(11) = 0
> > 2018-09-17 12:23:26.872 88424 NOISE safe_close(12) = 0
> >
> >
> > Postgres version : 10.5
> >
> > Libevent : 2.0.5
> >
> > Pgbouncer : 1.8.1
> >
> > OS : Centos 7
>
> Have there been updates to CentOS during this?
>
> >
> >
> > It used to work. Now after trying to install latest version of
> pgbouncer
> > (1.9.0) does not work anymore. Then I re-compiled the v 1.8.1
>
> Did you compile 1.9.0 from source or install from package?
>
> >
> >
> >
> > Content of the pgbouncer.ini
> >
> > [databases]
> > DB_NAME = host=IP_ADDD port=5432 dbname=DB_NAMEĀ auth_user=pgbouncer
> > pool_size=120
> >
> > [pgbouncer]
> > listen_port = 6543
> > listen_addr = *
> > auth_type = md5
> > auth_file = /etc/pgbouncer/users.txt
> > auth_query = select uname,phash from user_lookup($1)
> > logfile = /var/log/pgbouncer.log
> > pidfile = /home/postgres/pgbouncer.pid
> > admin_users = admin
> > user=postgres
> > max_db_connections = 220
> > log_connections=0
> > log_disconnections=0
> > verbose=3
> >
> >
> > Content of the users .txt
> >
> > [root@cmd-dev1 pgbouncer]# cat users.txt
> > "pgbouncer" "***************"
> >
> >
> > I tried to change the listen address to 127.0.0.1 or to the IP of
> the
> > VM. Nothing changed.
> >
> >
> > Can anyone help?
> >
> >
> > Thanks
> >
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, nicola.contu@gmail.com
Subject: Re: Pgbouncer and postgres
In-Reply-To: <6d2f155c-4bd4-14d8-bbf2-506617c9462a@aklaver.com>
References: <CAMTZZh3r06EkwdL6W58i3ODSohZV__Rf3uBktXLfKOhxPuU8oA@mail.gmail.com> <7bceb23a-8724-7fd9-bf74-e5dfd557283e@aklaver.com> <CAMTZZh1gzKiwDuZg9mmhMsrCZPJjN-fEtDpwcOtWzw09=cys4w@mail.gmail.com> <6d2f155c-4bd4-14d8-bbf2-506617c9462a@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox