{"action":"created","issue":{"url":"https://api.github.com/repos/rakshasa/rtorrent/issues/240","labels_url":"https://api.github.com/repos/rakshasa/rtorrent/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/rakshasa/rtorrent/issues/240/comments","events_url":"https://api.github.com/repos/rakshasa/rtorrent/issues/240/events","html_url":"https://github.com/rakshasa/rtorrent/issues/240","id":44031474,"number":240,"title":"Feature request: Check if disk is full and give a sane report if rtorrent crashes.","user":{"login":"ironhouzi","id":3307295,"avatar_url":"https://avatars.githubusercontent.com/u/3307295?v=3","gravatar_id":"","url":"https://api.github.com/users/ironhouzi","html_url":"https://github.com/ironhouzi","followers_url":"https://api.github.com/users/ironhouzi/followers","following_url":"https://api.github.com/users/ironhouzi/following{/other_user}","gists_url":"https://api.github.com/users/ironhouzi/gists{/gist_id}","starred_url":"https://api.github.com/users/ironhouzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironhouzi/subscriptions","organizations_url":"https://api.github.com/users/ironhouzi/orgs","repos_url":"https://api.github.com/users/ironhouzi/repos","events_url":"https://api.github.com/users/ironhouzi/events{/privacy}","received_events_url":"https://api.github.com/users/ironhouzi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-09-26T09:04:28Z","updated_at":"2015-07-11T14:56:05Z","closed_at":null,"body":"I had this problem: https://github.com/rakshasa/rtorrent/issues/39 and it would have saved me a lot of time if rtorrent would have checked this for me.\r\n\r\nThis is of course due to my own fault, but it would still be a nice feature for rtorrent to have.\r\nThanks for a great piece of software."},"comment":{"url":"https://api.github.com/repos/rakshasa/rtorrent/issues/comments/120627442","html_url":"https://github.com/rakshasa/rtorrent/issues/240#issuecomment-120627442","issue_url":"https://api.github.com/repos/rakshasa/rtorrent/issues/240","id":120627442,"user":{"login":"mrvn","id":3340710,"avatar_url":"https://avatars.githubusercontent.com/u/3340710?v=3","gravatar_id":"","url":"https://api.github.com/users/mrvn","html_url":"https://github.com/mrvn","followers_url":"https://api.github.com/users/mrvn/followers","following_url":"https://api.github.com/users/mrvn/following{/other_user}","gists_url":"https://api.github.com/users/mrvn/gists{/gist_id}","starred_url":"https://api.github.com/users/mrvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrvn/subscriptions","organizations_url":"https://api.github.com/users/mrvn/orgs","repos_url":"https://api.github.com/users/mrvn/repos","events_url":"https://api.github.com/users/mrvn/events{/privacy}","received_events_url":"https://api.github.com/users/mrvn/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T14:56:05Z","updated_at":"2015-07-11T14:56:05Z","body":"I have this in my .rtorrent:\r\n\r\n    # Close torrents when diskspace is low.\r\n    schedule = low_diskspace,5,60,close_low_diskspace=2000M\r\n \r\nBut with a maximum download speed of 13MiB/s that can get to 500MB free before stopping.\r\n\r\nAs a side note: Filesystems get realy realy realy realy slow when they get full. If you run rtorrent till the disk reports ENOSPC it will easily cache multiple GB of data in memory waiting to be written. Then what do you do with that data? You can't write it. You don't want to throw it away. Your system will start swapping making disks even slower. Conclusion: You want to stop early.\r\n\r\nAniketSK: I think rtorrent should sum up all partial and unwritten chunks and subtract that from the free disk space. What remains should be used as basis for the low_diskspace check. And instead of doing the check every 30 seconds why not check it before starting a new block?"}}