-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unraid server lockup issue #111
Comments
It is true that the identification process takes a bit of memory and lacks optimizations, how much RAM does your server have? It may very well be running out of memory. |
System has 32GB of RAM, using 54% with all dockers running. |
Would it be possible to maybe add an option in settings to not auto-scan (ever) until you can sort out the issue? |
This is definitely an Unraid issue then, I have Ownfoil running 24/7 on a server with 4GB of RAM and never ran into a server lockup issue... I don't know the first thing about Unraid, or how it handles container orchestration, but as a preventive measure you could look into how to restrict the limit of memory the container can reach. Do you have the last logs of the container before it becomes unresponsive so I can understand at what point it breaks? |
Not on unraid, Debian here. Will try to get you logs. |
Going to try adding: --memory=2G --cpus=1 to the docker and see if that makes a difference. If it crashes I'll see if I can pull a log, I don't see anything in the log file now. |
I think that may have fixed it, I've been trying to break it this morning and with the RAM/CPU limitations in place, everything has been fine. Thanks for the suggestion @a1ex4. |
OK, will try limiting memory/cpu in my docker-compose and report back. |
I may have spoken too soon. I am actually not sure how to do this in compose xD |
I haven't used compose much in the past, but have used composerize with some success: On Unraid it's Edit Docker->Advanced View->Extrar Parameters field. |
I've added mem_limit: 2G and cpus: 1.0 to my docker-compose.yml. I manually trigger a library refresh in ownfoil while watching resources in real time using "docker stats" and I see memory usage of the own foil container quickly reach the 2GB maximum and then plateau. I am still scanning my library (which is reasonably large) but have not seen any performance impact on the rest of my machine. This stabilizes the situation for me and others running containerized where it's easy to limit access to system resources. Not sure if it's a suitable fix or how those running bare metal will mitigate this issue. Thanks again for this software @a1ex4 !! |
Summary - Added all details mentioned in post below, nothing stands out as cause. Will continue to monitor. One thing to note was I had to rebuild the dB after the lock up as the entries were not populating. Running this for the first time with fresh pull on unraid 6.12.10 and had limited to 4G of ram (server this runs on has 128G) also just had my own server fully lock up. No ssh access etc. Server was running stable for over 120 days prior. Sequence of events when the lock up happened are approximately as follows. Will update the thread with the docker details shortly.
If logs are not overwritten I will also upload those as well - added snip of last entries. Docker compose detail below.
|
I'm having issues with Ownfoil just simply stopping on Unraid. It works completely fine, then I wont be able to bring up the page for it at all, look at Unraid and the server has "stopped". Re-start the server and its all OK again, until it randomly stops again. Thoughts? |
@orangewhipster Any chance the mover was running for the games folder location when this occurred? I've noticed the app hits a memory limit while I was running through the web looking for a few updates and copying files to the games folder. @a1ex4 Any idea where we can try and pin point this memory scenario? For myself when the memory limit is hit Unraid shuts down the docker itself instead of crashing the full server now at least. This is still with 4G of ram defined. Last entry in my logs show a sequence of events in the ~3 min leadup to the OOM event and the event happened ~1 min after the last entry below: [2024-10-04 13:09:30.441] INFO (_internal) 192.168.2.64 - "GET /api/titles HTTP/1.1" 200 - Had another crash doing similar steps - viewing the webpage, transferring files and appears to hang while identifying a file. File below is different than file above. Similar time after the last entry in logs before OOM event happened ~1 min. [2024-10-04 14:14:53.555] INFO (_internal) 192.168.2.64 - "GET /api/titles HTTP/1.1" 200 - Noticed something odd after restarting the docker again, appears there were additional log entries updated based on timestamp. Bolded lines below for quick reference. And according to the Unraid logs the timestamp of 14:16:21.467 in the logs below is just before the OOM event at 14:16:22 when my docker crashes. [2024-10-04 14:15:14.967] INFO (library) Scanning library path /games ... |
Yes, its possible. I left it running for the past day without any interaction with it and it hasn't crashed yet. So, must be something to do with scanning the library...cause that's when I noticed it happens. |
Im having this issue, i limited the ram usage to 2GB, but yes the webgui locks up once it hits the limit during a scan. |
From all of the reports shared here it would seem that the issue is happening when the directories are being monitored for file change events. I use the gorakhargosh/watchdog library and I don't see an issue related to Unraid on here. Perhaps it would be good to execute a simple Python script just like Ownfoil does when setting up the file watcher, in an Unraid environment and see if the memory gets used as with Ownfoil:
|
Could you guys try the new |
pulled the dev branch, just applied direct over latest and began to copy some files over while watching logs. I copied over a few games and a few updates. First two files it detected while copying over and it appears to have hung while identifying the second file, and webpage is fully unavailable/not opening. Didn't have the webpage open while I was transferring either, just watching the logs. Renamed the directory/file in the log below. Not sure if it makes any difference for debugging but in addition to basic alphabet characters the naming of the directory has spaces, hyphens and decimals/periods. File name has hyphens and underscores. Will restart container in a moment and compare logs. [2024-12-16 22:00:43.245] INFO (_internal) 192.168.2.64 - "GET /api/titles HTTP/1.1" 200 - |
Restarted the container and web came back up. Had to manually scan the directory and it detected the original games/updates above and the rest that were copied. Moving the files from the cache to the array (unraid automated process) and logs point to most of the files being deleted and added again. Manually scanning the library at this time allowed the missing files to be detected. Web didn't hang at this moment either. |
So my issue with the hanging I believe if it was trying to scan a
incomplete or corrupt nsp. I've edited my downloads to append a different
file name unless the file is complete.
I will try the new build soon
…On Tue, 17 Dec 2024, 10:21 am jaybird2203, ***@***.***> wrote:
Restarted the container and web came back up. Had to manually scan the
directory and it detected the original games/updates above and the rest
that were copied.
Moving the files from the cache to the array (unraid automated process)
and logs point to most of the files being deleted and added again. Manually
scanning the library at this time allowed the missing files to be detected.
Web didn't hang at this moment either.
—
Reply to this email directly, view it on GitHub
<#111 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHP2LSW2KWDJSNFC5QTDZXD2F6KDPAVCNFSM6AAAAABNK22CS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBXGQZDEOBXGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Okay so the new implementation did not correctly handle files being copied, I pushed a fix on the I'm curious if the situation improves for the memory lockup issue. |
Ran a few more copies and moves. No crash/hangs but missing entries. Logs state the files imported when they were finished copying in but not listed in the library/web. Proceeded to trigger the unraid move and get the log entry below. INFO (db) File '/games/Folder/game.nsp' removed from database. Manually rescanned the library via settings page and logs show the same files that were moved then "removed" were then identified again after the mover finished. In the above the titles are not updated on the web library interface. Will restart the container followed by a fresh database pull on the dev branch. Edit - after restarting the container the recently added, moved (removed), rescanned files now show in the web. Not sure if the two are connected but figured I'd mention here. |
Make sure that you are pointing to the user folder and not directly to the cache or one of the disks. FUSE shouldn't be letting anything see changes relating to which disk the file is on, that's the whole idea behind the mover mechanism. basically, go through and make sure all the mount points other than appdata are /mnt/user instead of /mnt/cache or /mnt/disk# |
Thanks for the direction to ensure the correct location is used although the /games directory was always set for /mnt/user location, not the user0 or cache etc. |
Been having entire server lockups forcing me to hard-reset the Unraid server since installing this docker app. I'm running Unraid 6.12.6 along with Emby, FileFlows, Resilio-Sync, Unraid-Cloudflared-Tunnel and ZeroTier dockers.
It's happened three times now while working on files for Ownfoil. Ownfoil watch folder is a folder on main array. Lockups happen seemingly randomly, but in every instance it's when either copying a file to the watch folder or deleting a file within it WHILE the Ownfoil docker is running.
My only workaround is to stop the Ownfoil docker, move/delete whatever files I need to in the watch folder, then re-start Ownfoil and have it do a scan. I'm not sure if it's locking up while a file is being transferred/deleted AND Ownfoil is doing a regular scan or what's happening.
The text was updated successfully, but these errors were encountered: