Node.js: what is ENOSPC error and how to solve?

后端 未结 16 2426
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-22 08:52

I have a problem with Node.js and uploading files to server. For uploading files to server I use this plugin. When starting file upload to the server, Node.js process crashe

16条回答
  •  一个人的身影
    2020-11-22 09:46

    Run the below command to avoid ENOSPC:

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

    For Arch Linux add this line to /etc/sysctl.d/99-sysctl.conf:

    fs.inotify.max_user_watches=524288
    

    Then execute:

    sysctl --system
    

    This will also persist across reboots. Technical Details Source

提交回复
热议问题