XMLTV file size limitations - appear to be fixed in 2935!

NB*: I have just tried this again, and it now works, so it appears to have been fixed in 2935. Hurray! However, there is no particular guidance on XMLTV size limitations and no acknowledgement in the changelog that this was even a problem (though other XMLTV related issues as well as a new feature–update interval–were explicitly mentioned). It would still be good to have some clarity on this matter, particularly if there are any lingering undocumented limitations on the size of the XMLTV file used. Leaving the following post up in its entirety as a reference regarding this issue.

Server Version#: 1.19.4.2902
Using XMLTV?: Yes

I’ve been using Schedules Direct’s guide data via epg123 for quite some time now on Windows Media Center. I’m struck by how often it is better than Plex’s data and like the customization that epg123 offers. The last time I tried to switch over to it, some years ago, it failed, but I decided to try again about a month ago. Unfortunately, it didn’t take again (which has led to a different problem, which I’ll be making a different thread about). The initial error messages I got, in both the GUI and logs, were not helpful, so I resolved to try again by creating an entirely new media server just for the purposes of testing XMLTV support.
What I found was that with an xmltv file with, say, a single channel in it, everything goes swimmingly. But a file with significantly more channels in it, like ~150 or so, that was ~110MiB large, failed to import with the following error:

Jun 05, 2020 03:18:56.151 [13320] DEBUG - EventSource: Failure in ParseMessage (0 - The operation completed successfully).
Jun 05, 2020 03:18:56.158 [13320] ERROR - EventSource: Retrying in 15 seconds.
Jun 05, 2020 03:18:58.167 [19312] ERROR - XML: Memory allocation failed 
Jun 05, 2020 03:18:58.167 [19312] ERROR - XML: Entity: line 884530: 
Jun 05, 2020 03:18:58.167 [19312] ERROR - XML: parser 
Jun 05, 2020 03:18:58.167 [19312] ERROR - XML: error : 
Jun 05, 2020 03:18:58.175 [19312] ERROR - Error parsing XML: bad allocation.
Jun 05, 2020 03:18:58.175 [4316] ERROR - Error parsing XML: bad allocation.

It seems like there is some file size limitation for the XML parser. This is not a hardware limitation as the PC this temporary server is running on is well equipped (TR 1950, 64 GiB RAM). The XML file generated by epg123 is not malformed, either: it imports fine in emby, which I only even signed up for to confirm this diagnosis–it does take a long time, but it also does eventually complete successfully. Selecting different options in epg123 also makes no difference–the only thing I’ve observed that does is the resultant size of the XML file, which is affected most by the amount of channels that guide data is fetched for.

Perusing the forums over the years, it seems like this is kinda-sorta a known issue, going back at least to 2017, but is never really accounted for, with advice often amounting to ‘roll back to such and such version of PMS’, which is absurd, and no real details regarding the actual size of the XMLTV files that people used (though they did mention that it worked in other software). It would be nice to have some clarity on what the limitations are here, and whether there are plans to lift/ameliorate those restrictions, for those of us with many channels. Thanks.

This was a known issue and was documented as corrected in 1.19.2.2673:

(DVR) Server would not load internet hosted XMLTV guide data that was over 16MB in size. (#11266).

As to whether or not there is some undocumented size limit for XMLTV files, I can’t say.

Good catch! Not sure how I missed that. That said, I’m not sure what ‘Internet-hosted’ means in this context. The XMLTV file in question is stored locally after having been compiled together by the EPG123 program. The original data on Schedules Direct is in fact ‘internet-hosted’, but not the XMLTV file. Moreover, regardless of whatever claimed fix was in 1.19.2.2673, it was not working for me in 1.19.4.2902, so either this is a separate issue, or there was a regression some time between 2673 and 2902 that has since been fixed in 2935. It would be nice to get some statement clearing up that the 16 MiB limitation was the only issue here, and that Plex can now work with XMLTV files of arbitrary size.

1 Like

We still have issues with massive xmltv files where memory allocation failures arise when processing large files - seen on 100Mb + files - but it depends on the structure of data within the xmltv and some large files still work ok

With regards to

I’m not sure what ‘Internet-hosted’ means in this context.

We had a number of issues in this area and they were addressed - one problem was for large downloads of xmltv files (internet-hosted) where the DVR settings has a url rather than a local file path. We also fixed issues for large xmltv files - except for what i mentioned regarding very large files.

There is still an open issue on some of these extra large files

1 Like

Thanks for the clarification! My hope then is that I’m now safe as long as I don’t add more channels/descriptions don’t vary in length too much and as long as EPG123 doesn’t change anything fundamental about the data structure of the files it generates. In any case, I’m glad that this is a known issue and being worked on-- thanks again for the prompt and affirmative reply!

Also, whatever you guys did, the import of this XMLTV file is lightning fast, so kudos!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.