Comments (4)
Found the issue, thank you.
There was a library that is made with workerpool, and i use that library in another part of the code after the workerpool
from workerpool.
So what are you doing exactly? How to reproduce your issue?
from workerpool.
I have a promise that takes more than that amount of time.
result = await jobsPool
.exec("performExecutionOfSpecificJob", [
jobToProcess._id.toString(),
jobToProcess.client._id.toString(),
JSON.stringify(configToProcess),
jobToProcess.notificationsCallback,
])
That is the exact code.
Thinking there might be some default, I even added the timeout line with a 120 minutes timeout but the error with the 600000 milliseconds still occur
result = await jobsPool
.exec("performExecutionOfSpecificJob", [
jobToProcess._id.toString(),
jobToProcess.client._id.toString(),
JSON.stringify(configToProcess),
jobToProcess.notificationsCallback,
])
.timeout(configProvider.HARD_TIMEOUT_FOR_JOB_IN_MINUTES * 60 * 1000);
from workerpool.
I tried to reproduce your issue with the following minimal example, running the script for more than 10 minutes, but the error does not occur:
const workerpool = require('workerpool');
const pool = workerpool.pool();
// Test issue https://github.com/josdejong/workerpool/issues/380
function testTimeout() {
return new Promise(resolve => {
setTimeout(() => {
resolve(42)
}, 10 * 600_000) // more than the magic 600000
});
}
async function run () {
console.log('started at', new Date().toISOString())
console.log('should throw a timeout exception after 600000 ms (10 minutes)')
const result = await pool.exec(testTimeout, [])
console.log('result', result)
await pool.terminate()
}
run().catch(console.error)
Can you provide a minimal example (with workerpool
only involved) that demonstrates the issue?
from workerpool.
Related Issues (20)
- child_process.spawn() or child_process.exec() HOT 1
- TypeError: process.send is not a function HOT 4
- (question) How to override the .exec function ? HOT 2
- How to use TypeORM or Prisma inside worker ? HOT 7
- how to use FileReaderSync in workerpool HOT 2
- How can a worker listen to master's specific event? HOT 1
- how to use workerEmit inside setInterval HOT 2
- How to post message from main thread to worker thread ? HOT 1
- Question: complex objects to worker HOT 3
- Not executing function that depends on variable/function out of scope. HOT 1
- : Cannot find name 'Transferable'. Did you mean 'Transfer'? HOT 2
- MongooDB instance is not connecting in dedicated worker HOT 10
- [benchmark] benchmark for various thread pools, but I am not sure if it is rigorous enough HOT 1
- [help wanted] Additional functions in worker context HOT 2
- Workerpool Error when using webpack HOT 3
- Make sure stats are always consistent when handling a task result HOT 5
- terminate(true) didn't kill the pool process HOT 3
- [fork-join] Can / How assign task to workers HOT 7
- capture stdio during execution of a task HOT 2
- Guidance on Restarting a Specific Service in Workerpool to Handle Memory Leaks in Playwright HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workerpool.