I am using Java FileWatcher nio package to watch for the file copying. My OS is Solaris 5. I am getting overflow event if file copy exceeds 500 numbers to the folder.
created /etc/sysctl.conf file and added below property.
fs.inotify.max_user_watches=50000
Still I am getting overflow.How do I increase the number of events to be stored up?
FileWatcher Code:
for (WatchEvent<?> event: key.pollEvents()) {
WatchEvent.Kind<?> kind = event.kind();
// This key is registered only
// for ENTRY_CREATE events,
// but an OVERFLOW event can
// occur regardless if events
// are lost or discarded.
if (kind == OVERFLOW) {
continue;
}