pg_cron
pg_cron copied to clipboard
pg_cron for PostgreSQL 12 stops working with message LOG: cron job 1 job startup timeout
Hello,
I have set up pg_cron on PostgreSQL 12 on production server. It was working properly. Suddenly it stops working with message LOG: cron job 1 job startup timeout.
I have tried below options still getting same message.
- I have restarted PostgreSQL service.
- Tried to create new job and tested.
- Removed pg_cron extension and recreated it. There is no pg_cron parameter available to change timeout value.
As per analysis this is the log. And job command didn't start within 10 sec so it was timeout.
2022-10-06 15:35:00.000 CEST [8334] DEBUG: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0 2022-10-06 15:35:00.000 CEST [8334] DEBUG: CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 51366430/1/0 2022-10-06 15:35:00.000 CEST [8334] DEBUG: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0 2022-10-06 15:35:00.001 CEST [8334] DEBUG: CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 51366431/1/1 2022-10-06 15:35:00.001 CEST [8334] LOG: cron job 1 starting: Refresh Materialized view CONCURRENTLY vw_publicmap_moor; 2022-10-06 15:35:00.001 CEST [8334] DEBUG: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0 2022-10-06 15:35:00.001 CEST [8334] DEBUG: CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 51366432/1/1 2022-10-06 15:35:10.000 CEST [8334] DEBUG: StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGRESS, xid/subid/cid: 0/1/0 2022-10-06 15:35:10.000 CEST [8334] DEBUG: CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGRESS, xid/subid/cid: 51366445/1/1 2022-10-06 15:35:10.000 CEST [8334] LOG: cron job 1 job startup timeout
How to resolve this issue ?
Any hint on this ?