Getting "Error: EBUSY: resource busy or locked, access '\\.\pipe\nitro\worker-24144-2.sock' | Nuxt"
Environment
Nuxt - v3.7.4 Nitro - v2.6.3
Reproduction
I don't have a proper link to reproduce but using the specified version of nuxt in an app where you have multiple endpoints being called within the same timeframe will cause this error.
Describe the bug
When building the nuxt project, getting Error: EBUSY: resource busy or locked, access '\\.\pipe\nitro\worker-24144-2.sock' | Nuxt errors for random endpoints.
Additional context
No response
Logs
No response
please fix this. my all projects does not works
I am experiencing the same issue. Due to this problem, I am unable to proceed with parallel processing. This is a critical issue that needs to be resolved quickly.
The best way to solve this issue is to help making reproduction steps we cannot solve it without.
I am experiencing the same issue. My system is Windows10 https://github.com/hefty/nitro-app.git may help
Having the same issue Windows 11, calling many endpoints at the same time (3).
Can you please try nightly channel? We had recently some stability improvements.
Same issue using the nightly channel, I used the repro created by @hefty as I don't know exactly how to test a specific version of nitro in my nuxt 3 app.
The code at src/core/dev-server/server.ts
const getWorkerAddress = () => { const address = currentWorker?.address; if (!address) { return; } if (address.socketPath) { try { accessSync(address.socketPath); } catch (error) { if (!lastError) { lastError = error; } console.log(error); if (error.message.includes('locked')) { return address; } return; } } return address; };
The server will check user's permission at each request coming, due to fs.accessSync not working properly (https://github.com/nodejs/node/issues/2949 ), caused this issue.
Managed to reproduce with Nightly and trimmed down the reproduction here: nitro_2729_repro.zip (hopefully I got it right)
Instructions to reproduce in the README
I guess you cannot access that file, it is a virtual file, node should resolve the real path in accessSync (if possible).
I have it working using local ip address instead localhost, nitro getting some internal error without adding ECONNRESET (check screenshot bellow):
- change the localhost with
- apply patch
- run
netstat -anand get local ip v4 address - run `pnpm nitro dev --host
- run the test
// node_modules/.pnpm/[email protected][email protected]/node_modules/nitropack-nightly/dist/core/index.mjs
// L2449
if (!address.socketPath.startsWith("\\\\") && error.code === "ENOENT") {
if (!lastError) {
lastError = error;
}
return;
}
I can also run the test using localhost with this:
// node_modules/.pnpm/[email protected][email protected]/node_modules/nitropack-nightly/dist/core/index.mjs
// L2449
if (!address.socketPath.startsWith("\\\\") && (error.code === "ENOENT" || "ECONNRESET")) {
if (!lastError) {
lastError = error;
}
return;
}
test ouput with ip iddress
error using localhost without last patch
I'm experiencing same error when multiple components fetch data simultaneously during page load. This happens even with only a few components.
After a 503 error, the requests automatically retry fetching. I'm looking for insights into what's causing this and how to resolve it. Currently, I'm adding random delays to the fetch requests to stagger them and avoid simultaneous fetching, but I would like to know if there's a better solution.
This seems fixed in 2.11, thanks!