question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Memory cache prevents torrent 100% complete on-disk

See original GitHub issue

I’m using MonoTorrent 2.0-rev0017. When I download a torrent, and it goes into TorrentState.Seeding, the disk cache isn’t flushed. So whenever I restart my application, and monotorrent hashes the existing file, the last downloaded piece will fail and will be re-downloaded. The file on-disk is never 100% complete.

I fixed this with:

_manager.TorrentStateChanged += (o, e) =>
{
    Console.WriteLine($"OldState: {e.OldState} NewState: {e.NewState}");
    if (e.NewState == TorrentState.Seeding) _ = _manager.Engine.DiskManager.FlushAsync(_manager);
};

But the disk manager should flush whenever the torrent is complete automatically, without being explicitly told.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Deathspikecommented, Dec 15, 2020

It’s not a problem. Please don’t turn the new feature(s) off in an alpha If I wanted perfect stability, I’d use the 1.0 branch. I’m using the alpha to help test 😃

I’ll use my flush-mechanism until you’ve got this tackled at some point in the future. Works for now haha

0reactions
alanmcgoverncommented, Dec 16, 2020

Great! Thanks for checking!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disk Overloaded 100% in 3.3.2 (Build 30303) - Bug Reports
The real problem here is when utorrent is trying to reserve the space when new torrent is added. There is few tricks you...
Read more >
High disk usage while seeding (up to 100%) · Issue #8273
If your seeded files don't fit into your memory (as filesystem cache) then high disk HDD usage is totally expected because like it...
Read more >
100% Disk Usage when downloading with qbitorrent (only ...
Sounds like a cache issue, far less likely is broken drive; could be multiple things accessing the drive or you are torrenting to...
Read more >
[uTorrent] Disk overloaded 100%..
So I'm trying to download a torrent here and I couldn't help but notice ... expand the bit that says Advanced and then...
Read more >
How to Resolve the uTorrent Disk Overloaded Error in ...
To fix this, you'll need to access the Preferences menu and enlarge the Disk Cache to superior value in order to prevent this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found