Closed jlcampbell1991 closed 2 years ago
I don't think this error is related to music-metadata.
Try another file operation with path, and see if that works. Otherwise move the file to a different location (e.g. /tmp
and see if it works from there.
Thanks for responding so quickly.
For posterity, I'll describe my solution to the problem.
I'm trying to read through my entire music library, 6k+ songs, and create a DB in a nodejs app. Originally, I ran parseFile
for each song. When developing locally on macOS, I had no trouble running the command 6k+ times, but on my production linux environment, I ran into the EPERM
error if I ran more than 500 parseFile
s at a time. In prototyping the feature for this app, I had read somewhere that there are limits to how many processes a user can run (vague, I know). I changed the logic in the app to split the parseFile
s into chunks of 500 and send to the DB, instead of getting all 6k and sending to the DB.
This seems to be working, even though it's slower.
For posterity, I'll describe my solution to the problem.
That gives a lot more context.
I ran more than 500 parseFiles at a time
Please ensure you run parseFile
in serial rather then parallel, which I think you already doing. So make sure you, only you only parsing the following song after the promise of parseFile
has been resolved. You could consider to also wait for the track data to be written to the database, just to ensure those requests are not piling up.
I have designed music-metadata to iterate over (large) music libraries, so it's a common use case.
I'm using
parseFile
to read metadata from a Node app on my raspi machine reading from a mounted directory and receiving errors like:Getting this error whether i run as root or my primary user