mage2tv / magento-cache-clean

A faster drop in replacement for bin/magento cache:clean with file watcher
BSD 3-Clause "New" or "Revised" License
527 stars 61 forks source link

[ERROR] ENOSPC: System limit for number of file watchers reached #66

Closed swaibar closed 4 years ago

swaibar commented 4 years ago

Hello,

I am using https://github.com/zepgram/magento2-fast-vm as a vagrant machine replicating a production Magento 2.3.3 site and I'm trying out the this module. After successfully including with composer require, and starting with vendor/bin/cache-clean.js --watch I get the error:

[ERROR] ENOSPC: System limit for number of file watchers reached, watch '/home/vagrant/magento/vendor/magento/module-url-rewrite/Test/Unit/Service/V1'

What have I done wrong?

Vinai commented 4 years ago

This probably can be solved with a one time command

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

before starting the watcher.

Please let me know if it works.

swaibar commented 4 years ago

Hi Vinai, yes this has worked, thank you.