Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some of the jobs missing schedules #549

Open
ptuli-rex opened this issue Mar 6, 2025 · 0 comments
Open

some of the jobs missing schedules #549

ptuli-rex opened this issue Mar 6, 2025 · 0 comments

Comments

@ptuli-rex
Copy link

i am using pgboss 8.3.1. Using a code similar to this to schedule the jobs -
const scheduleJob = async ( jobName: string, schedule: string, handler: any, expireInMinutes = 15 ) => { logger.info(scheduling job ${jobName} ${schedule} ${handler.name}); await boss.schedule(jobName, schedule, null, { expireInMinutes: expireInMinutes, singletonKey: jobName, useSingletonQueue: true, }); await boss.work(jobName, handler); };

I cannot reproduce exactly when but after a few days of restart of the nodejs instance(i have two pods in kubernetes), the same jobs will stop being scheduled and processed by worker. I am not sure its related but an error like this appears in the logs at the same time in the pgboss error handler-

pgboss error { code: 'ETIMEDOUT', message: ' (Queue: remind-xxxx, Worker: 5e26d17f-7356-48ec-b607-695450c95eca)', stack: 'AggregateError: (Queue:remind-xxxx, Worker: 5e26d17f-7356-48ec-b607-695450c95eca)\n' + ' at /app/node_modules/pg-pool/index.js:45:11\n' + ' at processTicksAndRejections (node:internal/process/task_queues:95:5)\n' + ' at runNextTicks (node:internal/process/task_queues:64:3)\n' + ' at processTimers (node:internal/timers:516:9)\n' + ' at Db.executeSql (/app/node_modules/pg-boss/src/db.js:28:14)\n' + ' at Manager.fetch (/app/node_modules/pg-boss/src/manager.js:477:20)\n' + ' at Worker.start (/app/node_modules/pg-boss/src/worker.js:49:22)', queue: 'remind-xxxx', worker: '5e26d17f-7356-48ec-b607-695450c95eca' }

the ETIMEDOUT error earlier used to appear rarely on starting the node instance as well, but i handled it using retries on the boss start. There are no issues of database connectivity within the rest of the application at the same time. Any related pointers are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant