LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2022, 01:33 PM   #1
MrBlueBudo
LQ Newbie
 
Registered: Jan 2022
Posts: 15

Rep: Reputation: 0
Unhappy inotify max_user_watches limit error when opening Clementine music player


Preliminaries first. Skip down 3 paragraphs for the issue. Any help for this exasperating problem will be greatly appreciated.

Linux Newbie (a few weeks into it). I'm on Ubuntu 22.04 LTS. It's updated several times in the last day so I'm assuming it's fully up-to-date.

I have a large (20,000+ files) music collection ripped from CDs that I've cultivated over many years in iTunes for macOS. With my recent move to Linux, I'm using Clementine because it's the only app I've tried that offers smart playlists, access to AAC files, and the "grouping" tag, which I use for styles (classic rock, outlaw country, etc.) and themes (summer, instrumental, etc.) that are a critical component for building my smart playlists.

The Issue

I was using Clementine 1.3.1 for a few days without incident using a limited set of music (1077 songs) copied off my flash drive. In the past couple of days, however, I'm getting the error "Failed to watch /MUSICFILEFOLDER . . . this may be due to the inotify max_user_watches limit." The only way I can stop the error is to stop the app from seeking updates to my music library on startup. That's not ideal since I'm rebuilding a lot of the tags data lost in the transition so my library is constantly changing.

The major recent changes have been:
  1. The aforementioned Ubuntu updates
  2. Clementine updated to 1.4.0rc1 through the Ubuntu Software store
  3. Sync.com Windows app and WineHQ installed to download my cloud files (Sync doesn't have a native Linux app)
  4. I used the Sync/Wine combo to downloaded my larger music library

This leaves my questions:
  1. The only two Clementine versions available in the Ubuntu Software store are both 1.4.0rc1 variations. Anyone know a reliable place to download the 1.3.1 version to see if that's the issue? The Ubuntu .DEB downloads at clementine-player.org just open the Ubuntu Software store.
  2. Is the inotify error related to the dramatic increase in the size of my music library? Is there a way to modify that? What are the ramifications if I do?
  3. I've quit the WineHQ/Sync apps and restarted but still get the error. Is there a chance that these could still be causing this error?
 
Old 05-06-2022, 04:32 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
The default I believe is 8192 and I can see that happening if you have 20,000+ files.

You can increase the number watches by using the command:
sudo sysctl fs.inotify.max_user_watches=524288

That changes the value in the running system. To make it permanent add/change fs.inotify.max_user_watches=524288 in the /etc/sysctl.conf file.
 
1 members found this post helpful.
Old 05-09-2022, 05:09 PM   #3
MrBlueBudo
LQ Newbie
 
Registered: Jan 2022
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
You can increase the number watches by using the command:
sudo sysctl fs.inotify.max_user_watches=524288

That changes the value in the running system. To make it permanent add/change fs.inotify.max_user_watches=524288 in the /etc/sysctl.conf file.
Thanks @michaelk. If I increase that watches number permanently, is that going to cause any systemic problems like slowing down the system, crashing processes, etc? I currently have 8MB memory (planning to upgrade to at least 16 but haven't yet)?
 
Old 05-09-2022, 05:35 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
I don't know. I've never watched that many files. It should not crash the system.
 
Old 05-09-2022, 06:15 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,127

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Why do you care ?. If the system is only/primarily for the music collection, suck it up - if the system is used for other (more) important things, read on.
For round numbers, work on 1k per watched entity (file/directory). This will be in kernel cache - but the kernel will generally look after itself. That may cause system slowdown, but would be unusual I would think, and would be next to impossible to predict. Just find a number that works for you and the pain level isn't too high.

Edit: I too haven't ever watched large numbers of files.

Last edited by syg00; 05-09-2022 at 06:16 PM.
 
Old 05-10-2022, 11:03 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by michaelk View Post
fs.inotify.max_user_watches=524288
My system already has that value, and I do not remember ever changing it, nor is it changed in /etc/sysctl*, so I guess this distro's maintainers compiled that into the kernel.

I never experienced systemic problems with that.

Last edited by ondoho; 05-11-2022 at 10:09 PM.
 
Old 05-11-2022, 02:05 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,127

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
The number itself isn't an issue, but allocating the inotify structures (by setting watches) might be if there are large numbers.
Or might not - experience will tell.
 
1 members found this post helpful.
Old 05-17-2022, 02:56 AM   #8
MrBlueBudo
LQ Newbie
 
Registered: Jan 2022
Posts: 15

Original Poster
Rep: Reputation: 0
The problem seems to have gone away without my doing any of the suggested fixes. My best guess is that my new cloud service app was the problem. It was downloading my 600+ GB file library at the time. I noticed the error did not return after the app's initial sync.

FWIW, the app – Mega – seems to be an incredible resource hog all around. I can barely do anything on my laptop when it's syncing and during that initial sync their website would freeze when I tried to access it. This is apparently (from what their tech said) because I had too many files. Nice of them to sell me a 2TB service that fails at <1/3 capacity.

Thanks all for the help even though I didn't use any of your suggestions!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Control Clementine Music Player From Your Phone LXer Syndicated Linux News 0 01-31-2020 11:01 AM
Music player Clementine Tagiga Linux - Software 1 03-19-2019 05:16 AM
LXer: Review: Clementine 1.2.3 Full-Featured Music Player Ubuntu Installation LXer Syndicated Linux News 0 04-25-2014 05:00 AM
LXer: Clementine Music Player 1.1 Released LXer Syndicated Linux News 0 10-26-2012 11:10 AM
LXer: Clementine Music Player Gets Spotify And Grooveshark Support LXer Syndicated Linux News 0 11-16-2011 07:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration