-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Unrecoverable crash every few days: context deadline exceeded #359
Comments
I found running bitmagnet on macOS Catalina and an old version of docker problematic. I could not update macOS or docker due Mac being a 2012 Mac mini. Split Fusion Drive and created partitions of ssd and hdd. Then dual booted to Ubuntu 24.10 and latest version of docker. Bitmagnet is now very stable - no crashes of docker daemon. Hence I suspect docker version and host os version are important for stable networking with bitmagnet crawling network loads |
There are various problem reports about Bitmagnet in connection with Docker on Windows or macOS hosts. The following should always be borne in mind: On Windows and macOS, it must always be borne in mind that the usual Docker stacks are mostly a virtualization solution. Probably Hyper-V on Windows today and Hyperkit on macOS. These are already highly optimized hypervisors for the platforms. The small Linux running in them is also highly optimized. However, both the hypervisor and the device model of the VM (emulated network card, etc.) or some setting in the parts of the stack (be it a kernel option in the kernel of the small Linux system) can lead to problems. |
Thanks for chiming in folks. To be clear for this issue, I am running docker natively on linux not via any hypervisor. I am using a Synology DS423+ NAS (which unfortunately still uses an older Docker Daemon - v24.0.2), paired with a modern M.2 NVME 1TB SSD and 18 GB of RAM. This wasn't a problem previously but i have been running Bitmagnet for almost 6 months so maybe the increased size of the DB is putting more pressure?. It is intermittent, I haven't had a crash in about a week. Honestly, an occasional crash isn't a big deal to me, but I'd like to debug why it was unable to recover on its own, and required my manually intervention. |
I was assuming macOS as it was in the first post above. NAS devices are also extremely unsuitable for software like Bitmagnet. At first glance, I would assume from the debug log that the restart does not succeed at all because “not the container” is terminated but because “the process is shot down” and Docker then stops the container. It could also be that it is simply getting tangled up. For me, the reason could be that there are situations in which files can no longer be opened. I would suspect this because of the “bad file descriptor” errors. It looks like it can't write to the socket, which causes it to crash at some point. That wouldn't surprise me with a NAS either. On the one hand, they already have a lot of files open, and on the other, a lot of small network connections open and therefore a lot of sockets open. It should be borne in mind that sockets in Unix are also files according to the “everything is a file” principle. |
Ah apologies, I thought that was for debugging the web app (which I am using macOS in this case). Regarding NAS devices in general, that is an interesting perspective, and that does make some sense, although i'm not certain it's what i'm experiencing based on a few things:
|
Describe the bug
Bitmagnet container crashes after some delay, about every ~1-3 days from what I can tell. It does not restart/recover automatically, seemingly because the exit code is 1 (docker is weird about restarting only for certain exit codes). I have been having some intermittent network stability issues with my ISP, and it seems loosely correlated with that, although it has happened even when I didn't notice any other problems on my network, so i'm not fully convinced that is the trigger/root cause.
I've attached the raw debug logs from a recent failover, AFAICT there isn't anything sensitive in them as it's mostly errors but apologize if I missed anything, happy to edit/redact if needed.
bitmagnet.log
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Bitmagnet to remain stable and not crash, however if it does crash ideally it would self-recover better as well.
Environment Information (Required)
v0.9.5
macOS 15.1.1 (24B2091)
Version 131.0.6778.70 (Official Build) (arm64)
(not WebUI related)Additional context
Bitmagnet was super heavy on Disk I/O, and I have plenty of RAM so I made some tweaks to the Postgres config to prefer RAM over Disk I/O in some cases, which has helped a lot with the performance of my Synology NAS DS423+.
Docker Compose:
The text was updated successfully, but these errors were encountered: