-
Notifications
You must be signed in to change notification settings - Fork 123
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
The value of "val" is out of range #491
Comments
👋 Hmm, interesting; can you provide an |
I got this same error when using an example from the book Multithreaded Javascript. Versions used: Node: 16, 18, 19 (20 gives a different error) Here is the code example: const Piscina = require('piscina')
const assert = require('node:assert')
const { once } = require('node:events')
if (!Piscina.isWorkerThread) {
const piscina = new Piscina({
filename: __filename,
maxQueue: 'auto'
});
(async () => {
for (let i = 0; i< 10_000_000; i++) {
if (piscina.queueSize == piscina.options.maxQueue) {
await once(piscina, 'drain')
}
piscina.run(i).then(squareRootOfI => {
assert.ok(typeof squareRootOfI === 'number')
})
}
})();
}
module.exports = num => Math.sqrt(num) |
I was able to reproduce it after some time, it seems that for faster workloads, the difference in nano is 0 causing the histogram go out of bounds. I'll prepare a fix for it soon |
While compiling a project using `swc`, I ran into the following issue. ``` Error The value of "val" is out of range. It must be >= 1 && <= 9007199254740991. Received 0 ``` After digging through, I was able to figure out that the root cause is the same as piscinajs/piscina#491. Unfortunately I don't have a repro that I can share, but the issue is well-documented in the linked issue.
Hello,
We are having a random issue we can't debug in development, but it's throwing exceptions in production.
The error says:
[ERR_OUT_OF_RANGE]: The value of "val" is out of range. It must be a safe integer greater than 0. Received 0
We attach a screenshoot of all the exception stack trace.
Someone having the same issue?
Regards.
The text was updated successfully, but these errors were encountered: