MP1.16 RecordingFileHandler: Error while deleting a recording from disk. (1 Viewer)

RonD

Test Group
  • Team MediaPortal
  • December 20, 2011
    911
    278
    SillyValley CA
    Home Country
    United States of America United States of America
    Updated from MP1.12 to MP1.16 over the weekend. No major install problems, just usual grumpiness getting new install working. On main tv server MePoTVS, did full uninstall, new install, channel scan setup etc.

    Seeing problems with tv recording and episode management. Never had this problem with MP1.12. MP is setup to record the afternoon local news on several channels from 5:00PM to 5:30PM and then the national news from 5:30PM to 6:00PM. Use Episode Management to keep 1 episode so each day MP deletes yesterdays news, recordings have 1 minute pre/post-store.

    On 3 or 4 nights tvserver gets hung up trying to delete the “yesterday NEWS.ts” file, tvserver spins forever trying/failing to delete the file and filling log files with the same error messages. When I use setuptv.exe I can do a manual server “stop” then “start”, and things start working again. This happens about 50% of time, some nights everything runs normal/clean, other nights I see the same type of problem, always with the evening news shows that use episode management.

    Tvserver system is MP1.16 tvserver/client, 4 core I5 CPU 12 GB ram, Win10 with all updates. The “K-drive” is dedicated 3 GB MP1.16 tvserver recording drive. Windows Defender is set to exclude the recording folder, nothing else on the drive. No other virus scan programs. Two MP1.16 clients have windows remote file access to recording folder to use TV-Series.

    When the problem happens I’m using a living room MP1.16 client to watch the recordings while the tvserver is recording the shows. Remote client recording access uses “MP RTSP streaming” does not do direct windows remote file access. TV-Series is setup to access recordings on the “k-drive” using windows file sharing. Had same recordings setup with MP1.12 and never saw this problem.

    The main error message is following. Once tvserver gets into error/spinning loop, fills 5MB log files over and over again with the same error messages.
    [2017-04-30 18:01:02,951] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.

    Also see the following, but this message happens without the “cannot access file” problem.
    [2017-04-30 18:01:02,938] [Log ] [scheduler thread] [ERROR] - Exception in Program.Persist() with Message The number of returned rows 0 did not match the expected count of 1+.
    If concurrency control is enabled this may indicate that the record was updated or deleted by another process

    The attached zip file has log files from the hang on Sunday 20170430. The key error log files are “TVService.6.log (6:01PM)”, since it shows the starting error event and TVService-Error.2.log (6:02PM). The other logs are just 5MB repeats of the file delete problem.

    4:59 PM, start recording local news
    StartRecording K:\MePo1\recordings\KNTV HD\NBC Bay Area News at 5\NBC Bay Area News at 5 - 2017-04-30.ts
    StartRecording K:\MePo1\recordings\KGO-HD\ABC7 News 5_00PM\ABC7 News 5_00PM - 2017-04-30.ts

    5:29 PM, start recording national news
    StartRecording K:\MePo1\recordings\KGO-HD\ABC World News Tonight\ABC World News Tonight - 2017-04-30.ts
    StartRecording K:\MePo1\recordings\KPIX-TV\CBS Weekend News\CBS Weekend News - 2017-04-30.ts
    StartRecording K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-30.ts

    5:31 PM, stop recording local news, delete 2017-04-29 files (ts, xml, comskip, others)
    stop record KGO-HD 4/30/2017 4:59:11 PM-4/30/2017 5:30:00 PM ABC7 News 5:00PM
    deleting 'K:\MePo1\recordings\KGO-HD\ABC7 News 5_00PM\ABC7 News 5_00PM - 2017-04-29.ts'
    stop record KNTV HD 4/30/2017 4:59:09 PM-4/30/2017 5:30:00 PM NBC Bay Area News at 5
    deleting 'K:\MePo1\recordings\KNTV HD\NBC Bay Area News at 5\NBC Bay Area News at 5 - 2017-04-28.ts'

    To make life interesting, xmltv does epg import, don’t think this triggers problem
    17:41:20 plugin:xmltv importing L:\MePo\xmltv\meposd\tvguide.xml
    17:48:06 plugin:xmltv import done

    6:01 PM, stop recording national news, delete 2017-04-29 files (ts, xml, comskip others)

    stop record KPIX-TV 4/30/2017 5:29:08 PM-4/30/2017 6:00:00 PM CBS Weekend News
    deleting 'K:\MePo1\recordings\KPIX-TV\CBS Weekend News\CBS Weekend News - 2017-04-29.ts’

    then stuff happens when tvserver tries to delete “yesterday” it can’t delete file and spins forever on “NBC Nightly News With Lester Holt - 2017-04-29.ts'”

    [2017-04-30 18:01:02,912] [Log ] [scheduler thread] [INFO ] - Scheduler: stop record KNTV HD 4/30/2017 5:29:06 PM-4/30/2017 6:00:00 PM NBC Nightly News With Lester Holt
    [2017-04-30 18:01:02,938] [Log ] [scheduler thread] [ERROR] - Exception in Program.Persist() with Message The number of returned rows 0 did not match the expected count of 1+.
    If concurrency control is enabled this may indicate that the record was updated or deleted by another process.
    [2017-04-30 18:01:02,940] [Log ] [scheduler thread] [INFO ] - diskmanagement: recording NBC Nightly News With Lester Holt ended. type:Once max episodes:1
    [2017-04-30 18:01:02,944] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:01:02,945] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:01:02,945] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.edl'
    [2017-04-30 18:01:02,947] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.log'
    [2017-04-30 18:01:02,949] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.logo.txt'
    [2017-04-30 18:01:02,950] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:01:02,951] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:01:02,958] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: adding filename to list of pending deletions: K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-30 18:01:02,967] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:01:02,967] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:01:02,968] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:01:02,968] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.

    tvserver spins forever filling log files with the same error messages
     

    Attachments

    • Hang20170430.zip
      998.5 KB

    RonD

    Test Group
  • Team MediaPortal
  • December 20, 2011
    911
    278
    SillyValley CA
    Home Country
    United States of America United States of America
    @mm1352000 any idea why tvserver tries/fails to delete the 0504 episode for 40 minutes, but after a tvserver stop/start tvserver can delete the problem episode during the restart, cleanup steps?

    Still seeing episode delete problems, on 2017-05-05 saw another and captured tvserver logs when the error occurred. Also setup ProcessMonitor to log all activity to K:\MePo1\recordings the tvserver recording folder that shows the delete problem. With ProcessMonitor I do NOT see any obvious activity to the KPIX 5 News at 5pm - 2017-05-04.ts file that causes "Episode delete" problems. The only access to that file is from tvserver.exe

    For tvserver, grabbed log files from the error event. Tvserver logs show 2 working cases and 1 failing case where tvserver cannot delete Recording.TS file. See TVService.1.log (5:32PM)

    Working cases

    [2017-05-05 17:31:15,793] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KGO-HD\ABC7 News 5_00PM\ABC7 News 5_00PM - 2017-05-04.ts'
    [2017-05-05 17:31:17,658] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Bay Area News at 5\NBC Bay Area News at 5 - 2017-05-04.ts'

    Failing case
    [2017-05-05 17:31:19,004] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KPIX-TV\KPIX 5 News at 5pm\KPIX 5 News at 5pm - 2017-05-04.ts' because it is being used by another process.

    Error repeats until tvserver is stopped at 6:10PM. Restarted tvserver and normal operation resumed. When I looked at the MP-Recordings I noticed the “KPIX 5 News at 5pm - 2017-05-04” file was deleted and MP-Recordings only has the “KPIX 5 News at 5pm - 2017-05-05” recording.

    #### Last Failure
    [2017-05-05 18:10:53,222] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KPIX-TV\KPIX 5 News at 5pm\KPIX 5 News at 5pm - 2017-05-04.ts' because it is being used by another process.
    [2017-05-05 18:10:53,223] [Log ] [TVService] [INFO ] - Controller: stop streamer...
    After restart, tvserver WAS able to delete the problem file. See
    TVService_ Restart.log Details
    [2017-05-05 18:11:04,684] [Log ] [TVService] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KPIX-TV\KPIX 5 News at 5pm\KPIX 5 News at 5pm - 2017-05-04.ts'
    [2017-05-05 18:11:04,686] [Log ] [TVService] [DEBUG] - - deleting 'C:\ProgramData\Team MediaPortal\MediaPortal TV Server\thumbs\KPIX 5 News at 5pm - 2017-05-04.jpg'
    [2017-05-05 18:11:04,683] [Log ] [TVService] [DEBUG] - ExecutePendingDeletions: number of pending deletions : 1
    [2017-05-05 18:11:04,683] [Log ] [TVService] [DEBUG] - ExecutePendingDeletions: trying to remove file : K:\MePo1\recordings\KPIX-TV\KPIX 5 News at 5pm\KPIX 5 News at 5pm - 2017-05-04.ts
    [2017-05-05 18:11:04,687] [Log ] [TVService] [DEBUG] - RecordingFileHandler: Clean orphan recording dirs for K:\MePo1\recordings\KPIX-TV\KPIX 5 News at 5pm\KPIX 5 News at 5pm - 2017-05-04.ts
    [2017-05-05 18:11:04,690] [Log ] [TVService] [DEBUG] - RecordingFileHandler: Origin for recording KPIX 5 News at 5pm - 2017-05-04.ts found: K:\MePo1\recordings
    Zipfile has logs
    TVService.1.log shows episode delete failure starting
    TVService_Stop.log shows log info from the tvserver halt
    TVService_Restart.log shows log info from the tvserver restart
     
    Last edited:

    RonD

    Test Group
  • Team MediaPortal
  • December 20, 2011
    911
    278
    SillyValley CA
    Home Country
    United States of America United States of America
    ProcessMonitor details for 0505 episode delete problem

    Logfile20170505.CSV 28000 line csv file with ProcessMonitor activity for K:\MePo1\recordings
    Search for the following file names to find working/failing "episode delete" info
    ABC7 News 5_00PM - 2017-05-04
    NBC Bay Area News at 5 - 2017-05-04
    KPIX 5 News at 5pm - 2017-05-04

    Summary20170505.xls "xls file" format 3 sheet speadsheet

    Speadsheet shows the 2 "episode delete" working cases and the 1 failing case. 1 sheet per "episode delete" just shows details for the working/failing cases skips 99% of the other ProcessMonitor log info.

    you can download from Process Monitor

    a comment/warning the 1st 2 times I tried use ProcessMonitor I got a windows "blue screen" crash. Make sure you "accept" the default "filter" if you try using ProcessMonitor. To monitor my MePo recording folder I added my own filter to Path > BeginsWith > K:\MePo1\recordings


    There is LOTs of traffic in the MP Recording folders. To capture "episode delete" problem I did start at 5:28PM and stop at 5:31PM after I noticed rapid updates to tvserver log files. In 3 minutes there are 2.7 million ProcessMonitor log entries and it creates a 30 MB log file.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi Ron

    @mm1352000 any idea why tvserver tries/fails to delete the 0504 episode for 40 minutes, but after a tvserver stop/start tvserver can delete the problem episode during the restart, cleanup steps?
    I think you've almost answered the question yourself:
    When the problem happens I’m using a living room MP1.16 client to watch the recordings while the tvserver is recording the shows.

    Explanation using your example for NBC Nightly News 29 April...

    A client starts viewing the recording of the 29 April episode:
    [2017-04-29 16:04:08,459] [Log ] [7 ] [INFO ] - RTSP: add stream BB6FFAD file:K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-29 16:04:08,468] [Log ] [7 ] [INFO ] - Controller: streaming url:rtsp://MePoTVS:554/BB6FFAD file:K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts

    This implies that the RTSP streaming server will be accessing the recording file. Obviously it has to in order to be able to provide the stream:
    [collapse]
    [2017-04-29 16:04:08,461] [3554] - Stream server: add mpeg-2 ts stream BB6FFAD filename:K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-29 16:04:08,462] [3554] - CTsDuration::ctor
    [2017-04-29 16:04:08,463] [3554] - TsMp2TFSMediaSubsession::InitFileDuration(): K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-29 16:04:08,464] [3554] - TsMp2TFSMediaSubsession::ctor - filename K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-29 16:04:08,467] [3554] - Stream server: url for stream is rtsp://192.168.0.102/BB6FFAD
    [2017-04-29 16:04:08,502] [2884] - ts:eek:pen K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-29 16:04:08,503] [2884] - CTSBuffer::ctor
    [2017-04-29 16:04:08,503] [2884] - ts:ctor:5c006d0
    [2017-04-29 16:04:08,503] [2884] - CTSBuffer::confused:etChannelType() - Read size set to TV (42112)
    [2017-04-29 16:04:08,503] [2884] - ts:size 458515456
    [2017-04-29 16:04:08,505] [2884] - TsMp2TFSMediaSubsession::duration(), actual: 301.510010 s, total: 301.510010 s
    [2017-04-29 16:04:08,505] [2884] - ts:dtor:5c006d0
    [2017-04-29 16:04:08,506] [2884] - CTSBuffer::dtor
    [2017-04-29 16:04:08,516] [2884] - ts:eek:pen K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-29 16:04:08,517] [2884] - CTSBuffer::ctor
    [2017-04-29 16:04:08,517] [2884] - ts:ctor:5bffe10
    [2017-04-29 16:04:08,518] [2884] - CTSBuffer::confused:etChannelType() - Read size set to TV (42112)
    [2017-04-29 16:04:08,518] [2884] - ts:size 458515456
    [2017-04-29 16:04:08,520] [2884] - ts:seek 0
    [2017-04-29 16:04:08,521] [2884] - CTSBuffer - m_maxReqSize: 1316)
    [2017-04-29 16:04:08,522] [2884] - CTSBuffer - m_minReqSize: 1316)
    [2017-04-29 16:04:08,522] [2884] - CTSBuffer::Require() - m_maxReadIterations: 1
    [2017-04-29 16:04:08,523] [2884] - TsMp2TSFramer - Average bitrate at start: 9391.416992 kbit/s calculated over 231 TS packets[/collapse]

    Note the stream URL which contains the stream ID:
    rtsp://192.168.0.102/BB6FFAD

    This will be important later.

    For now, the streaming server log shows the client merrily viewing the recording, skipping ads when relevant, until...
    [2017-04-29 16:24:33,015] [2884] - TsMp2TFSMediaSubsession::duration(), actual: 1526.095947 s, total: 1526.095947 s
    [2017-04-29 16:24:36,301] [2884] - ts:dtor:5bffe10
    [2017-04-29 16:24:36,303] [2884] - CTSBuffer::dtor

    ...they've reached the end of the recording. No more to view. Presumably the client moves on to other things at this time.

    There's now a gap of about 25 hours during which nothing relevant happens in the log files. The next relevant event is, as you've identified, the start of the recording for the 30 April episode:
    [2017-04-30 17:29:06,515] [Log ] [scheduler thread] [INFO ] - Scheduler: Time to record KNTV HD 5:29 PM-6:00 PM NBC Nightly News With Lester Holt
    ...
    [2017-04-30 17:29:06,710] [Log ] [scheduler thread] [INFO ] - card: WaitForFile - video and audio are seen after 0.0580944 seconds

    That episode finishes and recording stops:
    [2017-04-30 18:01:02,912] [Log ] [scheduler thread] [INFO ] - Scheduler: stop record KNTV HD 4/30/2017 5:29:06 PM-4/30/2017 6:00:00 PM NBC Nightly News With Lester Holt
    ...
    [2017-04-30 18:01:02,933] [Log ] [scheduler thread] [INFO ] - dvb:confused:topGraph filterstate already stopped, returning.

    Immediately following that we see the start of the failing attempts to delete the recording from the 29th:
    [collapse]
    [2017-04-30 18:01:02,940] [Log ] [scheduler thread] [INFO ] - diskmanagement: recording NBC Nightly News With Lester Holt ended. type:Once max episodes:1
    [2017-04-30 18:01:02,944] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:01:02,945] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:01:02,945] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.edl'
    [2017-04-30 18:01:02,947] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.log'
    [2017-04-30 18:01:02,949] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.logo.txt'
    [2017-04-30 18:01:02,950] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:01:02,951] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:01:02,958] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: adding filename to list of pending deletions: K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-30 18:01:02,967] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:01:02,967] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:01:02,968] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:01:02,968] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.[/collapse]

    ...and so on until you stop the TV service.

    Critical point here:
    [collapse][2017-04-30 18:05:19,416] [Log ] [TVService] [INFO ] - TV Service is being stopped
    [2017-04-30 18:05:19,417] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,419] [Log ] [TVService] [INFO ] - TV Service: stopping
    [2017-04-30 18:05:19,420] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,421] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,421] [Log ] [TVService] [INFO ] - TV Service: Stop plugins
    [2017-04-30 18:05:19,422] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,424] [Log ] [TVService] [INFO ] - plugin: ComSkipLauncher stop
    [2017-04-30 18:05:19,426] [Log ] [TVService] [INFO ] - plugin: xmltv stopped
    [2017-04-30 18:05:19,427] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,428] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,428] [Log ] [TVService] [DEBUG] - xmltv: UnRegistered xmltv as PowerEventHandler to tvservice
    [2017-04-30 18:05:19,429] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,430] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,432] [Log ] [TVService] [INFO ] - TV Service: Plugins stopped
    [2017-04-30 18:05:19,433] [Log ] [TVService] [INFO ] - TV service StopRemoting
    [2017-04-30 18:05:19,435] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,435] [Log ] [TVService] [INFO ] - Remoting stopped
    [2017-04-30 18:05:19,437] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,437] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,438] [Log ] [TVService] [INFO ] - Controller: DeInit.
    [2017-04-30 18:05:19,439] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,440] [Log ] [TVService] [INFO ] - Controller: HeartBeat monitor stopped...
    [2017-04-30 18:05:19,445] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,446] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,447] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,447] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,451] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,452] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,453] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,453] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,455] [Log ] [TVService] [INFO ] - Controller: stop streamer...
    [2017-04-30 18:05:19,457] [Log ] [TVService] [INFO ] - RTSP: stop streamer
    [2017-04-30 18:05:19,458] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,458] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,459] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,460] [Log ] [TVService] [INFO ] - RTSP: stop all streams (9)
    [2017-04-30 18:05:19,461] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,463] [Log ] [TVService] [INFO ] - RTSP: remove stream 9D80D7D4
    [2017-04-30 18:05:19,465] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,466] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,466] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,467] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,471] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,472] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,472] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,473] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,476] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,477] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,477] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,478] [Log ] [TVService] [INFO ] - RTSP: remove stream D182F9A9
    [2017-04-30 18:05:19,479] [Log ] [scheduler thread] [ERROR] - RecordingFileHandler: Error while deleting a recording from disk: The process cannot access the file 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts' because it is being used by another process.
    [2017-04-30 18:05:19,480] [Log ] [TVService] [INFO ] - RTSP: remove stream BB6FFAD
    [2017-04-30 18:05:19,483] [Log ] [scheduler thread] [INFO ] - diskmanagement: Delete episode TvDatabase.Channel NBC Nightly News With Lester Holt Saturday, April 29, 2017 3:59:07 PM
    [2017-04-30 18:05:19,483] [Log ] [scheduler thread] [DEBUG] - DeleteRecordingOnDisk: 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,488] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts'
    [2017-04-30 18:05:19,489] [Log ] [TVService] [INFO ] - RTSP: remove stream 9F876309
    [2017-04-30 18:05:19,491] [Log ] [TVService] [INFO ] - RTSP: remove stream 9D5FD7D4
    [2017-04-30 18:05:19,494] [Log ] [TVService] [INFO ] - RTSP: remove stream 615FDF60
    [2017-04-30 18:05:19,496] [Log ] [TVService] [INFO ] - RTSP: remove stream 56E9E5CB
    [2017-04-30 18:05:19,572] [Log ] [TVService] [INFO ] - RTSP: remove stream CB7007A8
    [2017-04-30 18:05:19,622] [Log ] [TVService] [INFO ] - RTSP: remove stream 2008D12F
    [2017-04-30 18:05:19,625] [Log ] [TVService] [INFO ] - Controller: streamer stopped...
    [2017-04-30 18:05:19,626] [Log ] [TVService] [INFO ] - Controller: stop thumb processor...
    [2017-04-30 18:05:19,627] [Log ] [TVService] [INFO ] - ThumbProcessor.Stop()
    [2017-04-30 18:05:19,628] [Log ] [TVService] [INFO ] - Controller: thumb processor stopped...
    [2017-04-30 18:05:19,629] [Log ] [TVService] [INFO ] - Controller: stop scheduler...
    [2017-04-30 18:05:19,632] [Log ] [TVService] [INFO ] - Scheduler: stopped
    [2017-04-30 18:05:19,667] [Log ] [RTSP Streaming thread] [INFO ] - RTSP: Streamer stopped
    [2017-04-30 18:05:19,873] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.txt'
    [2017-04-30 18:05:19,874] [Log ] [scheduler thread] [DEBUG] - - deleting 'K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.xml'
    [2017-04-30 18:05:19,875] [Log ] [scheduler thread] [DEBUG] - - deleting 'C:\ProgramData\Team MediaPortal\MediaPortal TV Server\thumbs\NBC Nightly News With Lester Holt - 2017-04-29.jpg'
    [2017-04-30 18:05:19,877] [Log ] [scheduler thread] [DEBUG] - RecordingFileHandler: Clean orphan recording dirs for K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts
    [2017-04-30 18:05:19,878] [Log ] [scheduler thread] [DEBUG] - RecordingFileHandler: Checking 1 path(s) for cleanup
    [2017-04-30 18:05:19,878] [Log ] [scheduler thread] [DEBUG] - RecordingFileHandler: Origin for recording NBC Nightly News With Lester Holt - 2017-04-29.ts found: K:\MePo1\recordings
    [2017-04-30 18:05:19,879] [Log ] [scheduler thread] [DEBUG] - RecordingFileHandler: Found irrelevant file NBC Nightly News With Lester Holt - 2017-04-30.ts in recording path K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt - not cleaning[/collapse]

    In short, over and over again we see the file can't be deleted until suddenly it is successfully deleted after stream BB6FFAD is removed from the streaming server (as part of the TV service shutdown process). As I pointed out above, stream BB6FFAD is the stream that corresponds with the episode that TV Server was failing to delete. In other words: the streaming server's use of the file is preventing TV Server from deleting it. The question is: why is the streaming server still using the file 25 hours after the client finished viewing it?

    Well, when the stream is removed from the streaming server, the streaming server log shows:
    [2017-04-30 18:05:19,482] [594] - Stream server:confused:tream server: remove stream BB6FFAD
    [2017-04-30 18:05:19,488] [594] - CTsDuration::dtor
    [2017-04-30 18:05:19,489] [594] - TsMp2TFSMediaSubsession::dtor (K:\MePo1\recordings\KNTV HD\NBC Nightly News With Lester Holt\NBC Nightly News With Lester Holt - 2017-04-29.ts)

    I traced this back in the code and found that the CTsDuration instance - a necessary object used for keeping track of the stream duration - has the file open until this point.

    @Owlsroost
    According to the code history, it looks like the pulling in of TsReader's file handling in MP 1.16 PR has introduced a critical change in the duration calculation handling.

    Previously:
    MediaPortal-1/TsMPEG2TransportFileServerMediaSubsession.cpp at 9595740a336776945bb8ec6da3c45dc473378270 · MediaPortal/MediaPortal-1 · GitHub

    Now:
    MediaPortal-1/TsMPEG2TransportFileServerMediaSubsession.cpp at master · MediaPortal/MediaPortal-1 · GitHub

    Note how in the old code the duration() and fileLength() members do:
    Code:
    FileReader *pFileDuration = OpenFileDuration();
    if (pFileDuration)
    {
       // work here
      CloseFileDuration(pFileDuration);
      // return success result
    }
    // return fail result

    ...whereas the new code opens the file once when the CTsDuration instance is constructed, and only gets around to closing it in the CTsDuration destructor. The optimisation is a nice idea and seems to work fine for time-shift streams. However as Ron's log files show, it poses a problem for streaming of recordings. I'm surprised nobody using KODI as a front end has reported a problem because the KODI plugin creates streams for all recordings at TV Server startup. The current streaming server code would presumably prevent recordings from being deleted from the front end!

    Are you able to revise the streaming server code?
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    I traced this back in the code and found that the CTsDuration instance - a necessary object used for keeping track of the stream duration - has the file open until this point.

    @Owlsroost
    According to the code history, it looks like the pulling in of TsReader's file handling in MP 1.16 PR has introduced a critical change in the duration calculation handling.

    Previously:
    MediaPortal-1/TsMPEG2TransportFileServerMediaSubsession.cpp at 9595740a336776945bb8ec6da3c45dc473378270 · MediaPortal/MediaPortal-1 · GitHub

    Now:
    MediaPortal-1/TsMPEG2TransportFileServerMediaSubsession.cpp at master · MediaPortal/MediaPortal-1 · GitHub

    Note how in the old code the duration() and fileLength() members do:
    ...whereas the new code opens the file once when the CTsDuration instance is constructed, and only gets around to closing it in the CTsDuration destructor. The optimisation is a nice idea and seems to work fine for time-shift streams. However as Ron's log files show, it poses a problem for streaming of recordings. I'm surprised nobody using KODI as a front end has reported a problem because the KODI plugin creates streams for all recordings at TV Server startup. The current streaming server code would presumably prevent recordings from being deleted from the front end!

    Are you able to revise the streaming server code?

    Nice piece of detective work - well done :)

    I see what you mean - I obviously hadn't realised/noticed that streamed recording Media Subsessions were never closed by the client (does this mean they keep building up until TV Server is re-started?).

    I suspect the easiest thing is to add an explicit CloseDurationFile() method (called after each duration update/file length request) - I'll look into it.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Nice piece of detective work - well done :)
    Thanks... though I have to say Ron made it easy for me. Catching the helpful sections of the log file before it overflowed with "...failed to delete..." can't have been too easy. Thanks Ron. (y)

    I see what you mean - I obviously hadn't realised/noticed that streamed recording Media Subsessions were never closed by the client (does this mean they keep building up until TV Server is re-started?).
    Very easy to miss. :)

    In short: yes they keep building up.

    Normally recordings that are AddStream()'d (=> StreamAddMpegFile()) are available to stream until the TV service stops. TV Server normally adds those streams/sessions on demand (as/when requested by a MediaPortal client). However as mentioned in my previous reply, when the KODI plugin is installed, the KODI plugin AddStream()s all recordings in the database at service startup. Presumably this is done to simplify interaction on the client side. From a TV Server and streaming server perspective the implication is that we can't proactively clean up streams/sessions... but we still have to minimise file use.

    Note that there are different concepts of sessions/sub-sessions at play here. The streaming server has one session/sub-session (ServerMediaSession/TsMPEG2TransportFileServerMediaSubsession) per recording. That's the one that's not per client/connection, and it doesn't get cleaned up until the streaming server or TV service is stopped. There's also a lower level RTSP/RTP connection/session (MPRTSPClientSession) which is per client/connection. Those lower level connections/sessions do get closed and cleaned up when clients finish playing the stream and/or disconnect.

    I suspect the easiest thing is to add an explicit CloseDurationFile() method (called after each duration update/file length request) - I'll look into it.
    Yeah, something like that. I leave it in your very capable hands. Thanks. :)
     

    RonD

    Test Group
  • Team MediaPortal
  • December 20, 2011
    911
    278
    SillyValley CA
    Home Country
    United States of America United States of America
    my 2 cents, since the tvserver fill 5 MB log files every 1-2 minutes, I had sit on tvserver windows console window and watch the log folder, if the logs were getting rapid writes, make a "on the fly" snapshot of the log files to a temp folder the do tvserver stop to poke around.

    I thought there something weird going on with streaming server when I looked at the "TVService_Stop.log" file and saw the following

    [2017-05-05 18:10:53,223] [Log ] [TVService] [INFO ] - Controller: stop streamer...
    [2017-05-05 18:10:53,224] [Log ] [TVService] [INFO ] - RTSP: stop streamer
    [2017-05-05 18:10:53,228] [Log ] [TVService] [INFO ] - RTSP: stop all streams (7)
    [2017-05-05 18:10:53,229] [Log ] [TVService] [INFO ] - RTSP: remove stream C3E3683B
    [2017-05-05 18:10:53,232] [Log ] [TVService] [INFO ] - RTSP: remove stream 713D34B9
    [2017-05-05 18:10:53,235] [Log ] [TVService] [INFO ] - RTSP: remove stream 3B7D7504
    [2017-05-05 18:10:53,241] [Log ] [TVService] [INFO ] - RTSP: remove stream B3D234E1
    [2017-05-05 18:10:53,262] [Log ] [TVService] [INFO ] - RTSP: remove stream C404683B
    [2017-05-05 18:10:53,270] [Log ] [TVService] [INFO ] - RTSP: remove stream 715E34B9
    [2017-05-05 18:10:53,272] [Log ] [TVService] [INFO ] - RTSP: remove stream 33827504
    [2017-05-05 18:10:53,275] [Log ] [TVService] [INFO ] - Controller: streamer stopped...

    I was wonder why were these streams sitting around? Each night I close all MP clients, I expected tvserver would cleanup all streams when MP clients were shutdown.

    I'm seeing 1 more problem with MP1.16 that I did not see with MP1.12. I'm hard of hearing and use ATSC ClosedCaptions, also have attention deficit disorder so I do lots of timeskip forward/back when I miss something in the audio.

    If ATSC ClosedCaptions = Disabled, skip forward/back 30, 60, 90 secs never seems to cause a problem

    If ATSC ClosedCaptions = Enabled, skip forward/back 30, 60, 90 secs has a ~10% chance of causing video hang, audio seems to play for a few more seconds. If I do enough skipping around, chapter skip etc I seem to get a hang. When the hang happens, MP1.16 ignores all input, mouse, keyboard and I have to use Win10 Task-Manager to kill MP Client. When MP video/audio hangs, Task-Manager shows the MP-Client CPU is still receiving Ethernet data at 5 to 15 Mbps for the TV-Server streaming data, even though MP-Client is "stuck". After restarting MP-Client everything works until I do enough skipping around with ATSC ClosedCaptions active. Many of the leftover RTSP stream are side effect MP-Client hangs and killing the Client.

    Did not have ATSC ClosedCaptions problems with MP1.12, will reproduce this problem and get log files.

    One more comment, should the Episode Management code have some sort of safety belt, if delete file fails try a few times, log an error message, and suspend deleting old episodes? The Episode delete spin-out causes tvserver to loop forever, does not end active recordings, or start new scheduled recordings. I 1st noticed the problem when I went to watch a show that started at 8PM, recording folder did not show expected 8PM active recordings and showed recordings in progress that should have ended at 6PM. That started the head scratching about what was causing problems.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I was wonder why were these streams sitting around?
    ...
    Each night I close all MP clients, I expected tvserver would cleanup all streams when MP clients were shutdown.
    Ron, there are no streams sitting around.
    When a client disconnects, all associated streams are closed.
    The only "things" that aren't closed until the TV service is stopped are sessions, which are like advertisements for the available channels/recordings.
    This is not something to be concerned about; 100% normal.

    I'm seeing 1 more problem with MP1.16 that I did not see with MP1.12.
    Please start a new thread with log files etc.

    One more comment, should the Episode Management code have some sort of safety belt
    Yes, probably.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom

    New version of StreamingServer.dll (for MP 1.16 TV Server) attached - v1.1.5 - for testing. This should fix the 'open files after playing via RTSP' problem, which prevents them from being deleted.

    To install, stop the TV service, make a backup copy of the original StreamingServer.dll in 'C:\Program Files (x86)\Team MediaPortal\MediaPortal TV Server', then copy the new dll into the folder to replace the original dll. Restart TV Service.

    I've tested the new dll by creating a few recordings, playing them all on a remote client via RTSP, then deleting them either via the MP TV client or directly via Windows explorer (without stopping the TV service). In all cases they were deleted without a problem.

    Please let me know how the testing goes (fingers crossed :)).

    (Github branch: MediaPortal-1/DirectShowFilters/StreamingServer/Source at MP1-4866-BUG_Recording_files_left_open_by_StreamingServer · MediaPortal/MediaPortal-1 · GitHub )
     

    Attachments

    • StreamingServer_dll_v1.1.5.zip
      81.7 KB

    Users who are viewing this thread

    Top Bottom