by jamesio » Thu Nov 19, 2015 11:52 am
I hope the following information helps with the debugging of this issue.
I've run Newsbin for a long time and a few versions ago in the 6.x series, my downloads also started stopping (weird phrase). Every beta or release update had the same issue. I've tracked it down to one thing: the Chunk folder.
Originally, I noticed that the memory was 0/1000. The first few weeks of this, I'd exit Newsbin and restart it. The closing always took longer than a close when the memory was not at 0.
I then learned from the forums that you can do a Help/About to try and free memory. This worked to free up some memory, but never went to the full 1000. Ever.
I then upped the memory to 6000. The issue took a lot longer to happen, but it would end up at 0/6000.
Exiting and restarting Newsbin gave the best results, but even when it started up with nothing in the download list the memory would drop to some other number such as 2378/6000. And that's from a fresh start after exiting previously with nothing in the download list.
At this point, if it ran out of memory I would just do Help/About and let the download list download/unrar naturally and then exit/restart Newsbin. This was my pattern for weeks. Some times it would take only an hour or two to run out of memory or it could take a full day or more.
As a fluke, I decided to clean up the directory that Newsbin stores the Chunk and other folders. Whoa... Newsbin started up with 6000/6000. Hasn't happened in months.
As each 0/6000 happened, I'd do my normal: Help, About, clear download list, exit Newsbin, delete Chunk folder and all download database files.
I then decided to isolate even further. As the next 0/6000 happened, same pattern, but I'd only delete portions of the folder. The last remaining thing that was deleted as a solo item was the Chunk folder. Once this was deleted alone, the memory would start up as 6000/6000.
So then, I realized that I also had a lot (about 30) of watched items with auto-download. I think I know what's happening in the most general sense, but not within the internals of Newsbin.
Newsbin starts up with 6000/6000. My timer is set to 15 minute increments to download headers. It does this and finds new material to put in the download list. It then tries to download the pieces. Some make it and some don't (spam). Those pieces always stay in the Chunk folder. Memory decreases a bit. New material gets in the download list of many gigs. Those chunks get worked, unrared and removed from the download list. Memory decreases. I then check the Chunk folder. Item was downloaded, unrared and removed, but it has 1000s of chunk pieces still in the Chunk folder.
I think this is the root of the problem. I'm not sure what the clean up or memory pattern is relating to chunks in the Chunk folder, but even after downloading something the chunks remain. Or at least a large number of chunks remain. Memory never goes down to the original number prior to the download. This continues for hours and then 0/6000.