pgq / pgqd

PgQ maintenance daemon
ISC License
19 stars 4 forks source link

Non-descriptive error with pgqd 3.3 #1

Closed gmr closed 2 years ago

gmr commented 4 years ago

I'm running a custom built pgqd and running into a weird error I could not track down in the code, as there is no message:

2020-01-10 20:42:16.699 27 ERROR 

Full output with -v

2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: [pgqd]
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'syslog' = '0'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'syslog' = '0' ok:1
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'base_connstr' = '***'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'base_connstr' = ***' ok:1
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'initial_database' = 'app'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'initial_database' = 'app' ok:1
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'database_list' = 'app'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'database_list' = 'app' ok:1
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'check_period' = '60'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'check_period' = '60' ok:1
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'retry_period' = '30'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'retry_period' = '30' ok:1
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'maint_period' = '120'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'maint_period' = '120' ok:1
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'ticker_period' = '1'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'ticker_period' = '1' ok:1
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'connection_lifetime' = '3600'
2020-01-10 20:42:16.606 27 DEBUG parse_ini_file: 'connection_lifetime' = '3600' ok:1
2020-01-10 20:42:16.606 27 LOG Starting pgqd 3.3
2020-01-10 20:42:16.607 27 DEBUG app: launch_ticker
2020-01-10 20:42:16.673 27 DEBUG app: select 1 from pg_catalog.pg_namespace where nspname='pgq'
2020-01-10 20:42:16.675 27 DEBUG app: select pgq.version()
2020-01-10 20:42:16.678 27 LOG app: pgq version ok: 3.2.6
2020-01-10 20:42:16.678 27 DEBUG app: launch_maint
2020-01-10 20:42:16.681 27 DEBUG app: launch_retry
2020-01-10 20:42:16.692 27 DEBUG app: starting maintenance
2020-01-10 20:42:16.693 27 DEBUG app: select 1 from pg_proc p, pg_namespace n where p.pronamespace = n.oid   and p.proname = 'maint_operations'   and n.nspname = 'pgq'
2020-01-10 20:42:16.694 27 DEBUG app: select func_name, func_arg from pgq.maint_operations()
2020-01-10 20:42:16.697 27 DEBUG app: starting retry event processing
2020-01-10 20:42:16.697 27 DEBUG app: select * from pgq.maint_retry_events()
2020-01-10 20:42:16.699 27 ERROR 
2020-01-10 20:42:16.699 27 DEBUG app: close_maint, 20.000000
2020-01-10 20:42:16.701 27 DEBUG app: close_retry, 30.000000

Dockerfile:

FROM alpine:3.10

ARG PGQD_URL=https://github.com/pgq/pgqd.git

RUN apk add --update --no-cache libevent libpq \
 && apk add --update --no-cache --virtual devdeps autoconf automake gcc git libevent-dev libtool make musl-dev postgresql-dev linux-headers \
 && git clone https://github.com/pgq/pgqd.git /tmp/pgqd \
 && cd /tmp/pgqd \
 && git submodule update --init \
 && ./autogen.sh \
 && ./configure \
 && make \
 && make install \
 && cd / \
 && rm -rf /tmp/pgqd \
 && apk del --purge devdeps \
 && mkdir -p /opt/pgqd

COPY etc/ /etc/

CMD /usr/local/bin/pgqd -v /etc/pgqd.ini

I did notice that pgqd is 3.3 and pgq is 3.2.6, will go hunt that down and see if it's related.

Any thoughts as to what this could be?

gmr commented 4 years ago

After manually updating the pgq extension from v3.2.6 (which is installed via deb package from pgdg) to v3.3.1, I am seeing the same behavior.

markokr commented 2 years ago

Only potential path for it I see is weird db name. Added quoting for dbname in v3.5, that should fix it.