docker-android icon indicating copy to clipboard operation
docker-android copied to clipboard

add max fs watch limit

Open sandikodev opened this issue 4 years ago • 2 comments

for several error's kinda like

Error: ENOSPC: System limit for number of file watchers reached, watch '/__w/try-deploy-gayatri/try-deploy-gayatri/node_modules/@babel/plugin-transform-react-jsx-self/node_modules/@babel/core/lib/transformation'
    at FSWatcher.<computed> (internal/fs/watchers.js:218:26)
    at Object.watch (fs.js:1525:34)
    at NodeWatcher.watchdir (/__w/try-deploy-gayatri/try-deploy-gayatri/node_modules/sane/src/node_watcher.js:159:22)
    at Walker.<anonymous> (/__w/try-deploy-gayatri/try-deploy-gayatri/node_modules/sane/src/common.js:109:31)
    at Walker.emit (events.js:315:20)
    at /__w/try-deploy-gayatri/try-deploy-gayatri/node_modules/walker/lib/walker.js:69:16
    at FSReqCallback.oncomplete (fs.js:171:23) {
  errno: -28,
  syscall: 'watch',
  code: 'ENOSPC',

just puting them

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

on Dockerfile

sandikodev avatar Mar 29 '21 10:03 sandikodev

Maybe just use RUN echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf

https://github.com/laradock/laradock/blob/5b321d6fd71646d5aeecea2087bc420d50559d1a/ide-theia/Dockerfile#L7

gengjiawen avatar Apr 07 '21 11:04 gengjiawen

Can we close this? I believe I haven't seen such errors in a long time

cortinico avatar Apr 18 '23 11:04 cortinico