Closed EvertEt closed 3 years ago
As long as a job is in active state, the maintenance commands should have moved this to expired. Have you customized your maintenance configuration?
Some more details about the configuration:
publishOnce
with a priority and retryLimit: 0
.new PgBoss({
host: config.db_host,
database: config.db_name,
user: config.db_user,
password: config.db_password,
port: config.db_port || 5432,
})
By default, maintenance runs every 2 minutes. You can verify this by querying the maintained_on
.
select * from pgboss.version
If the timestamp in maintained_on is current and the job is still active after it should have been expired, something is wrong. In your original post, you didn't include the current time, so the job data alone doesn't indicate if it should be expired or not.
The logic for expiration in the expiration command is the following.
...
WHERE state = 'active'
AND (startedOn + expireIn) < now()
...
I forgot to mention some important details indeed.
version 12
. 4.1.0
Please upgrade to a more recent version in order to rule out a hung maintenance monitoring issue fixed since 4.1.0
It is indeed quite old. Can we stay within v4 or should we upgrade to the latest v6?
I will close the issue as it seemed to be a one-time thing so far, and indeed on a quite old version.
Thanks for looking into it!
You can stay on v4 if you want, but I don't see the harm in upgrading since you shouldn't lose any data.
I noticed a job stuck in our pg-boss table. I believe it should have been expired but it was not restarted. Before I deleted the job from the table, I did copy the row:
Did we misconfigure anything or do you know what might have caused this job to stay in active? Other jobs were getting created and picked up well at the same time.