Too many open files, unable to open database file (synology)


#1

Sonarr version (exact version): 2.0.0.5252
Mono version (if Sonarr is not running on Windows): 5.8.0.108
OS: Synology (linux)
Debug logs: http://justchil.net/debug.txt
Description of issue: too many open files, unable to open database then it uses a ton of cpu and no longer runs properly

I’m finding a lot of dead ends. Sonarr and Radarr both do this… my logs are from Radarr… Sonarr will crash soon so I will post those too. The problem started with Sonarr (I’m assuming due to having more files?).

The ONLY reason I run this on the Synology is to have local access to storage. If there is a better way to go about this I’m all ears. I’ve yet to see a solution to this problem anywhere.

Is there a setting within Sonarr / Radarr? I see no fixes and no official support for the Synology OS but other programs like transmission have settings that prevent it from happening.


#2

sysctl -a | grep file
fs.file-max = 1618426
fs.file-nr = 11072 0 1618426

open files (-n) 90000

in /etc/profile ulimit -c unlimited

Not sure what else I can try on the OS.


#3

its probably a mono issue, the community package is at 5.8, the linuxserver docker image is at 5.16 (it still has issues), i believe 5.12? was reported as being stable but thats only helpful if you have a system you can play around with mono to get it at that version

not sure you can do anything about it due to mono being a package. you could look into using a docker image

note - i use the linuxserver/sonarr:latest image and it still has issues but ive also got a scheduled task to restart the container every night so mono has less chance to go mental.


#4

Thanks for the reply. That gives me some ideas and things to try!


#5

I moved Sonarr / Radarr / Lidarr / Transmission all to Docker. SAB is still on the synology. So far so good… I had it restarting daily but I’m going to let it run to see how long it stays working.

Thanks again for the help.


#6

For anyone who may find this in the future… Moving Sonarr && Radarr to docker solved my issue. I haven’t had a crash yet! I have a weekly task to restart them but I’m waiting for a crash to happen before enabling this.

I didn’t know much about Docker before this… what an awesome tool.


closed #7

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.