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

Error: ENOSPC: System limit for number of file watchers reached #130

Open
somedevreally opened this issue Nov 23, 2021 · 4 comments
Open

Comments

@somedevreally
Copy link

hello,

am getting this error with latest docker container

2021-11-23 02:07:59 [INFO] The Lounge v4.3.0 (Node.js 16.13.0 on linux x64)
2021-11-23 02:07:59 [INFO] Configuration file: /var/opt/thelounge/config.js
2021-11-23 02:07:59 [INFO] Available at http://[::]:9000/ in private mode
node:internal/fs/watchers:252
    throw error;
    ^
Error: ENOSPC: System limit for number of file watchers reached, watch '/var/opt/thelounge/packages/package.json'
    at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
    at Object.watch (node:fs:2247:34)
    at watchPackages (/usr/local/share/.config/yarn/global/node_modules/thelounge/src/plugins/packages/index.js:165:5)
    at Object.loadPackages (/usr/local/share/.config/yarn/global/node_modules/thelounge/src/plugins/packages/index.js:161:2)
    at Server.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/thelounge/src/server.js:186:12)
    at Object.onceWrapper (node:events:509:28)
    at Server.emit (node:events:390:28)
    at emitListeningNT (node:net:1368:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -28,
  syscall: 'watch',
  code: 'ENOSPC',
  path: '/var/opt/thelounge/packages/package.json',
  filename: '/var/opt/thelounge/packages/package.json'
}
@williamboman
Copy link
Member

Hello, does it work fine with previous releases such as thelounge/thelounge:4.2.0?

What's your:

  • Docker version ($ docker --version):
  • The Lounge image:
  • Host system ($ uname -a):

@somedevreally
Copy link
Author

i had this same error for last couple of months, and i was thinking new build might help. so i waited
right now i checked as back as tag 3.0.1 same error.

Docker v19.03.15
docker image thelounge/thelounge:latest
host system is Photon OS 4.0

thanks

@williamboman
Copy link
Member

Hm I don't believe this is caused by anything in the thelounge image, have you tried a docker system prune? If you're running via Docker Desktop, have you tried increasing the allocated resources?

@darthdubu
Copy link

hello,

am getting this error with latest docker container

2021-11-23 02:07:59 [INFO] The Lounge v4.3.0 (Node.js 16.13.0 on linux x64)
2021-11-23 02:07:59 [INFO] Configuration file: /var/opt/thelounge/config.js
2021-11-23 02:07:59 [INFO] Available at http://[::]:9000/ in private mode
node:internal/fs/watchers:252
    throw error;
    ^
Error: ENOSPC: System limit for number of file watchers reached, watch '/var/opt/thelounge/packages/package.json'
    at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
    at Object.watch (node:fs:2247:34)
    at watchPackages (/usr/local/share/.config/yarn/global/node_modules/thelounge/src/plugins/packages/index.js:165:5)
    at Object.loadPackages (/usr/local/share/.config/yarn/global/node_modules/thelounge/src/plugins/packages/index.js:161:2)
    at Server.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/thelounge/src/server.js:186:12)
    at Object.onceWrapper (node:events:509:28)
    at Server.emit (node:events:390:28)
    at emitListeningNT (node:net:1368:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -28,
  syscall: 'watch',
  code: 'ENOSPC',
  path: '/var/opt/thelounge/packages/package.json',
  filename: '/var/opt/thelounge/packages/package.json'
}

Solution found here: https://stackoverflow.com/questions/53930305/nodemon-error-system-limit-for-number-of-file-watchers-reached

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

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

3 participants