You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our project is undergoing pressure testing in docker container by JMeter, when the concurrent count is high, the following error will occur, But the directory is actually exist.
2023-12-25 07:47 +00:00: Error: ENOENT: no such file or directory, scandir '/app/packages/eshop/public/locales/cn'
at Object.readdirSync (node:fs:1405:3)
at getLocaleNamespaces (/app/node_modules/next-i18next/dist/commonjs/config/createConfig.js:214:16)
at /app/node_modules/next-i18next/dist/commonjs/config/createConfig.js:231:20
at Array.map (<anonymous>)
at getNamespaces (/app/node_modules/next-i18next/dist/commonjs/config/createConfig.js:230:44)
at createConfig (/app/node_modules/next-i18next/dist/commonjs/config/createConfig.js:271:29)
at _callee$ (/app/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:201:53)
at tryCatch (/app/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17)
at Generator.<anonymous> (/app/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22)
at Generator.next (/app/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21) {
errno: -2,
syscall: 'scandir',
path: '/app/packages/eshop/public/locales/cn'
}
2023-12-25 07:46 +00:00: Error: ENOENT: no such file or directory, scandir '/app/packages/eshop/public/locales/cn'
at Object.readdirSync (node:fs:1405:3)
at getLocaleNamespaces (/app/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:241:37)
at /app/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:247:22
at Array.map (<anonymous>)
at _callee$ (/app/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:246:64)
at tryCatch (/app/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17)
at Generator.<anonymous> (/app/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22)
at Generator.next (/app/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21)
at asyncGeneratorStep (/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9) {
errno: -2,
syscall: 'scandir',
path: '/app/packages/eshop/public/locales/cn'
}
Here is the PT report could show the relationship between concurrent count and error count. The more concurrent count, the more error count.
I tried to invoke a large number of fs.readdirSync to read the directory, it didn't occur the error.
Maybe this is not next-i18next's problem, but I have no clue...
It's not easy to reproduce, unless use high concurrent request.
Expected behavior
Do not report errors
Your Environment
runtime version: node v16.16.0, next v12.2.0
i18next version: 21.10.0
os: Linux
next-i18next: 11.3.0
The text was updated successfully, but these errors were encountered:
yuuk
changed the title
Encontering Error: ENOENT: no such file or directory, scandir 'XXX' occasionally
Encountering Error: ENOENT: no such file or directory, scandir 'XXX' occasionally
Dec 25, 2023
🐛 Bug Report
Our project is undergoing pressure testing in docker container by JMeter, when the concurrent count is high, the following error will occur, But the directory is actually exist.
Here is the PT report could show the relationship between concurrent count and error count. The more concurrent count, the more error count.
I tried to invoke a large number of
fs.readdirSync
to read the directory, it didn't occur the error.Maybe this is not next-i18next's problem, but I have no clue...
To Reproduce
next-i18next.config.js
PM2 config
It's not easy to reproduce, unless use high concurrent request.
Expected behavior
Do not report errors
Your Environment
The text was updated successfully, but these errors were encountered: