System limit for number of file watchers reached

I had for the longest time wondering why files were not being synced with insync, but then I realised it seems, each time I restart my machine I get the following errors:

Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reached, watch ‘/var/www/miniatureawards.com/node_modules/@emotion/react/node_modules’

I wonder if when my system is System limit is reached insync cannot sync any more files?

Hi @Jamie_Hutber!

Let me have this checked. Could you confirm if this error is on your machine itself, or is it shown on Insync?

Please also share your machine specs (OS, version, memory, etc).

Its on the system itself. I believe it has something to do with the number of files being watched in the NAS drive which is where the isync synced folder is.

Linux Mint 20.3
Processor 12th Intel i9
Memory 64gb DDR5

1 Like

@Jamie_Hutber Interesting. Let me ask our engineers regarding that!

@Jamie_Hutber Hi!

A lot of files are probably being watched by your system, which triggers the error. As per our engineer, you can increase the limit by modifying this file: “/etc/sysctl.conf”

Add “fs.inotify.max_user_watches=1048576”, then replace 1048576 with a higher number

You can can check out the limit by running sysctl fs.inotify.max_user_watches :slight_smile:

Hey MIa

Thanks very much for looking into this.

I actually had set this value to 1048576. So then checking the sysctl.conf I realised that insync had added the value to a lower amount.

Thus my problem. I will reset with the new numbers and see what happens.

image

1 Like

Sounds like a plan, let me know how it goes after resetting the new numbers. :slight_smile:

I finally worked out what this was. I increased the numbers and actually it did not make a different. The issue was, I have included all of my websites source code, which includes node_modules etc. So it really was a case of not having enough user watches, on a system level.

1 Like

Thank you for the update, @Jamie_Hutber! Please let me know if you need anything else.