Closed ghost closed 4 years ago
I've been changing channel numbers for a while and it doesn't reproduce. Maybe it really is running out of memory in your case? My biggest channel json has 20 MB, but I don't really have that many shows. I wonder how big is the channel json for the channel you are trying to rename? I see that the process got to 2 GB
Okay, I limited my container's memory to 1 GB, and tried moving around some channels and it reached out of memory. It definitely shouldn't need that much memory for that (or should it?) will try to look for leaks.
The size of the json doesn't seem to be related as the crash occurs with any channel. My largest json is 6.8M and a total size of all is 229M.
I've just tried changing some channels again and it isn't crashing if I allow some time between each attempt.
The system has 64GB in total and normal ram usage of the container is around 764MB. However, after changing the first channel number the usage peaks to 2.4GB and then settles to 1.64GB. When the memory usage reaches >2.7GB then the crash occurs.
I've been testing for a bit. The size of the specific channel being renamed doesn't matter. But the total size of the channels does. Because the memory issue is when generating the TV guide.
What I've found is that the TV guide process is quite wasteful and creates multiple copies of the channel db when there are many TV guide updates pending in the queue. I've been tweaking this a bit and now am able to keep dizquetv running below 500MB when constantly updating my channels (in total my channels are 50MB and the container needs 250 initially, so just 5 extra copies of the channels db should be enough to kill the container).
@morlanth are you able to build docker images from a github branch? If so I can send you a branch that you can test with and confirm that the memory issue is fixed with the changes I am trying.
Yes, I am able to do that but it won’t be until tomorrow morning.
The current dizquetv:development image should have the fix now.
I've built an image from the 20200909_dev branch.
Initial memory use is lower than before at 318M. After the first channel number change, peak was 1.5G and settled down to 900M. There were no crashes on any of the following attempts and the largest memory peak observed was 1.8G. The memory usage settled down to around 700M on average.
When changing the channel number of existing channels a crash occurs when attempting to change the second channel.
Using the latest master branch in Docker (19.03.12)