|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#161
|
||||
|
||||
Yep, just post it on the thread and i'll give it a shot.
|
#162
|
|||
|
|||
Hmm... my idea was already implemented in the code. Are you running the task client as a service? If so, can you go to the install directory then into the logs dir then look at wrapper.log, is there an exception dump in there?
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#163
|
||||
|
||||
Nope, i'm running in a client window right now. I am getting these errors, but I figured they were unrelated. Then again, since I don't understand any of this I prolly shouldn't make assumptions like that
Code:
Exception in thread "Thread-288" java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8080/sjq/SJQ?proto=4&cmd=writeLog at com.google.code.sagetvaddons.sjqc.TaskClient.log(Unknown Source) at com.google.code.sagetvaddons.sjqc.IOMonster.dumpBuffer(Unknown Source) at com.google.code.sagetvaddons.sjqc.IOMonster.run(Unknown Source) Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8080/sjq/SJQ?proto=4&cmd=writeLog at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ... 3 more Exception in thread "Thread-295" java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8080/sjq/SJQ?proto=4&cmd=writeLog at com.google.code.sagetvaddons.sjqc.TaskClient.log(Unknown Source) at com.google.code.sagetvaddons.sjqc.IOMonster.dumpBuffer(Unknown Source) at com.google.code.sagetvaddons.sjqc.IOMonster.run(Unknown Source) Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8080/sjq/SJQ?proto=4&cmd=writeLog at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ... 3 more Exception in thread "Thread-343" java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8080/sjq/SJQ?proto=4&cmd=writeLog at com.google.code.sagetvaddons.sjqc.TaskClient.log(Unknown Source) at com.google.code.sagetvaddons.sjqc.IOMonster.dumpBuffer(Unknown Source) at com.google.code.sagetvaddons.sjqc.IOMonster.run(Unknown Source) Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8080/sjq/SJQ?proto=4&cmd=writeLog at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ... 3 more Quote:
Last edited by evilpenguin; 12-03-2009 at 02:04 PM. |
#164
|
|||
|
|||
Ok, now we're getting somewhere.
The IOMonster threads are indeed dying off. They try to flush the output back to the server and the server is throwing back a 500 HTTP response, which the client doesn't like and the thread dies off. When the IO consumer dies off, the native process that was running will hang. So now I know why you're seeing the hang, now I need to know why the server is not completing the logging of the output. In an ideal world, you're always running Sage with its debug logging turned on and you've enabled Jetty's logging. So now you need to match those client exceptions with the exceptions that are logged in the Jetty debug logs. If you don't live in my Utopian world ( ), then you'll need to turn on Sage debug logging and Jetty logging and reproduce this and get the server side exception that's causing the client side ones you've provided above.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#165
|
|||
|
|||
I just tried to reproduce the problem on my install, but was unable to. I just wrote a program that dumped 10240 lines of output to stdout and the task client gleefully flushed all 10240 lines (in two separate flushes) to the server and the server wrote them to the db with no issues. Since I can't reproduce the problem, I'm going to need someone who can to get the server side exception corresponding to the task client exceptions EP provided above.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#166
|
||||
|
||||
Ok, now that I know what's going on, that shouldn't be a problem.
|
#167
|
||||
|
||||
Quote:
Code:
2009-12-03 14:56:30,078 ERROR [DataStore]: SQL error java.sql.SQLException: database locked at org.sqlite.DB.execute(DB.java:270) at org.sqlite.DB.executeUpdate(DB.java:281) at org.sqlite.PrepStmt.executeUpdate(PrepStmt.java:77) at com.google.code.sagetvaddons.sjq.server.DataStore.setSetting(DataStore.java:930) at com.google.code.sagetvaddons.sjq.server.MediaFileQueueLoader.run(MediaFileQueueLoader.java:48) at java.lang.Thread.run(Unknown Source) 2009-12-03 15:01:24,781 INFO [SJQServlet]: Checking client '127.0.0.1': 100 resources free. 2009-12-03 15:06:24,781 INFO [SJQServlet]: Checking client '127.0.0.1': 100 resources free. Code:
Thu Dec 03 17:19:56 CST 2009: SJQ Application Dump MediaQueueLoader thread is dead! SysMsgQueueLoader thread is alive... java.lang.Thread.sleep(Native Method) com.google.code.sagetvaddons.sjq.server.SystemMessageQueueLoader.run(SystemMessageQueueLoader.java:77) java.lang.Thread.run(Unknown Source) ClientMonitor thread is alive... java.lang.Thread.sleep(Native Method) com.google.code.sagetvaddons.sjq.server.ClientMonitor.run(ClientMonitor.java:38) java.lang.Thread.run(Unknown Source) InteralTaskClient thread is alive... java.lang.Thread.sleep(Native Method) com.google.code.sagetvaddons.sjq.server.InternalTaskClient.run(InternalTaskClient.java:63) java.lang.Thread.run(Unknown Source) Most recent LogCleaner thread is dead (this is normal behaviour)! Most recent FileCleaner thread is dead (this is normal behaviour)! Most recent VacuumCleaner thread is dead (this is normal behaviour)!
__________________
Check it out! - http://www.vholdr.com/video/playing-sky |
#168
|
|||
|
|||
You need to restart SJQ after changing the log level. You'll know if it worked because the log will start to produce way, way more output.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#169
|
|||
|
|||
Quote:
Incidentally, I didn't mean to mislead you. I also have a Q6600, and the behavior I am seeing is 25% utilization overall (100% of one CPU core), though it lasts far more than a second for me, more like 20. Too bad SageTV doesn't appear to make use of SMP. That was one advantage of Comskip Monitor that I didn't fully appreciate at the time: I didn't have to care how much CPU its poll took since it and SageTV were on different cores. Thanks for the info!
__________________
Andrew |
#170
|
|||
|
|||
Quote:
But if it's spiking a core for 20 seconds then I'm now guessing it's more of a function of the number of objects that it's processing on each run. How big is the set of objects being scanned? On my Q6600 I have SJQ only process tv recordings, I have about 685 and it takes less than two seconds for each run of the queue loader and I do some rather funky things in my rulesets. For a core to be 100% for 20 seconds I might expect you to be processing close to 10000 objects, and if you are processing that many then there's not much you can do about it other than reduce the size of the list being scanned. If you're only scanning tv files and you have 10000 then I doubt there's much that can be done other than to try and optimize your rules and hope for the best.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#171
|
|||
|
|||
Snapshot 676 turns back on the logging of how much time each thread takes to run at the INFO level instead of DEBUG. Those of you having problems please move to 676 and get me some timings.
Thanks.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#172
|
|||
|
|||
Q6600, 2GB RAM, WinXP SP3, Java 1.6.0_17, SageTV 6.6.1, ~685 recordings (+/- whatever it recorded tonight) and snapshot 676 of SJQ constantly reports between 2.4 and 2.7 seconds for the queue loader to run with this ruleset:
Code:
/* # Create a single task to dump 10K plus lines of output to test the client flushing data back to server error reported on the forums if [IsObjMediaFile == true && $.GetShowTitle{} == "House"] { NOISE } */ # Move syndicated shows, movies, plus anything else marked for archival to the NAS if [IsObjMediaFile == true && $.IsTVFile{} == true && (TimeUntilNextRecording >= "4H" || FreeSpacePercentage < 7) && $.IsFileCurrentlyRecording{} == false && (((($.GetShowCategory{} == "Movie" && $.GetShowSubCategory{} != "Documentary") || $.GetShowTitle{} =% "Friends|Seinfeld|Night Court|Three's Company|Family Guy|Married \\.\\.\\. With Children") && $.IsLibraryFile{} == false) || ($.IsLibraryFile{} == true && Filename !^ "\\\\nas"))] { :MOVERECOPTS "\\\\nas\\tv" :FAILALERT "true" _MOVEREC } # Test rule for mediashrink experiment; basically don't queue up anything except that one episode of Three's Company for testing purposes if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsAiringHDTV{} == false && $.GetShowCategory{} != "Movie" && $.GetShowTitle{} == "Three's Company" && Filename =$ ".ts" && $.IsFileCurrentlyRecording{} == false && $.GetShowEpisode{} == "Doctor in the House"] { :PRIORITY -10 #:SCANMEDIA "true" MEDIASHRINK } /* # Old SDCOMM task; not used anymore; keep for reference if [IsObjMediaFile == true && $.IsTVFile{} == true && $.IsFileCurrentlyRecording{} == false && $.IsWatchedCompletely{} == false && $.GetChannelName{} !% "HBOC.+|M|MXS|MFUN|MFEST|MHD" && $.GetChannelNumber{} !% "8\\d\\d|9\\d\\d" && $.GetShowTitle{} !% "MLB Baseball|NFL.*Football|NHL Hockey|College Basketball|College Football" && $.GetShowExternalID{} != NoShow && ($.IsManualRecord{} == true || $.IsFavorite{} == true) && FileExists != "%d%/%p%.edl" && Filename =$ ".mpg"] { :PRIORITY 10 SDCOMM } */ # Comskip HDPVR recordings; use different task name so we can assign more req'd resources for HDPVR processing if [IsObjMediaFile == true && $.IsTVFile{} == true && Filename =$ ".ts" && $.IsFileCurrentlyRecording{} == false && $.IsWatchedCompletely{} == false && $.GetChannelName{} !% "HBOC.+|M|MXS|MFUN|MFEST|MHD|HDNTCAN" && $.GetChannelNumber{} !% "8\\d\\d|9\\d\\d" && $.GetShowTitle{} !% "MLB Baseball|NFL.*Football|NHL Hockey|College Basketball|College Football" && $.GetShowExternalID{} != NoShow && ($.IsManualRecord{} == true || $.IsFavorite{} == true) && FileExists != "%d%/%p%.edl"] { :PRIORITY 5 HDCOMSKIP } # Comskip recordings from PVR-250s; we can do lots of these ones simultaneously if [IsObjMediaFile == true && $.IsTVFile{} == true && Filename =$ ".mpg" && $.IsFileCurrentlyRecording{} == false && $.IsWatchedCompletely{} == false && $.GetChannelName{} !% "HBOC.+|M|MXS|MFUN|MFEST|MHD|HDNTCAN" && $.GetChannelNumber{} !% "8\\d\\d|9\\d\\d" && $.GetShowTitle{} !% "MLB Baseball|NFL.*Football|NHL Hockey|College Basketball|College Football" && $.GetShowExternalID{} != NoShow && ($.IsManualRecord{} == true || $.IsFavorite{} == true) && FileExists != "%d%/%p%.edl"] { :PRIORITY 10 SDCOMSKIP } # Download fanart as needed if [IsObjMediaFile == true && $.IsTVFile{} == true && ($.GetShowCategory{} !% "Special|Standup|Documentary" || $.GetShowSubCategory{} !% "Special|Standup|Documentary") && FileExists != "D:/FANART/TV/$.GetShowTitle{}" && ($.IsManualRecord{} == true || $.IsFavorite{} == true) && $.IsLibraryFile{} == false] { :PRIORITY -5 TVMETADATA } Code:
2009-12-04 00:51:48,302 INFO [MediaFileQueueLoader]: MediaFileQueueLoader completed [2500ms]
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#173
|
|||
|
|||
Turns out through some experimentation that the FileExists test is way more expensive than any Sage API test, which given the disk I/O isn't too surprising. Adding this test to my ruleset:
Code:
if [IsObjMediaFile == true && FileExists == "%d%/%p%.mkv" && Filename !$ ".mkv"] { :RELINKOPTS "$.GetAiringID{}" "%d%/%p%.mkv" _RELINK } NOTE: The _RELINK internal task referenced above is not committed yet, but will be soon. The _RELINK task will allow you to relink the airing info from one recording to another (perfect for relinking the airing info after transcoding a recording with EP's mediaShrink tool).
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#174
|
|||
|
|||
Snapshot 679 includes a fix for an integer overflow bug that caused the db vacuum process to run each and every time the media queue loader was triggered instead of once every 30 days as intended. Though it shouldn't have caused 'database locked' errors, it certainly could have (the SQLite vacuum command is by far one of the most expensive db operations on an SQLite database). With this discovery I reverted the fix I applied in 677 so that the app is once again more concurrent/zippy. If people start to see database locked errors again with 679 please let me know and I'll reapply that fix on top of 679. All snapshots between 665 and 677, inclusive, have been pulled from the downloads site and should be avoided by users due to the integer overflow bug. Users of any of these snapshots should move forward to 679 or later.
679 also includes the _RELINK internal task. User guide updated with details on its usage (read those docs carefully before using this task; should be treated with same level of caution as _MOVEREC task). (Again, with that obligatory warning, I'm happily using the _RELINK task with excellent results.)
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... Last edited by Slugger; 12-05-2009 at 12:58 PM. |
#175
|
|||
|
|||
Slugger,
About the relink how exactly do you schedule it do you include it with your mediashrink rule? Do you base it on mediashrink returning a 0 code. ?
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#176
|
|||
|
|||
Nope, I use a separate rule. I actually use the rule posted a few above this. I look for an mkv matching a non-mkv and if they both exist I relink the airing info. A recent bug in mediaShrink has prevented me from fully testing my sol'n so I'll post a more complete example once I'm done testing, but I committed the _RELINK task because it was already implemented in my local tree along with the integer overflow fix (and I've tested the _RELINK task enough on its own to be confident with it).
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#177
|
|||
|
|||
After installing this latest version, none of my clients show up. Did I break it?
|
#178
|
|||
|
|||
What version did you upgrade from? Server 679 requires task client 655. If you are using client 655 then there's a chance the client tried to connect to the server while you were upgrading and if so it would have died off - just restart the task client and you should be good to go.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#179
|
|||
|
|||
Quote:
|
#180
|
|||
|
|||
thats likely output from the comskip log... and it probably means that no ini file was specified in the commandline, or found in the current directory... so comskip ran using just the defaults... you can specify the ini file using:
Code:
--ini %PATHTOINIFILE%
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sage Job Queue (SJQ) new release notifications | Slugger | Customization Announcements | 3 | 12-17-2009 09:59 AM |
Plugin: Sage Job Queue (SJQ) | Slugger | SageTV Customizations | 991 | 12-11-2009 03:52 PM |
Sage Job Queue Completed tasks problem | raffmanlt | SageTV Customizations | 2 | 08-18-2009 07:34 PM |
Comskip Monitor VS Sage Job Queue SJQ | personalt | SageTV Customizations | 6 | 03-02-2009 10:27 AM |
Plugin: SJQ v1.1.0RC1 Available - Testers Needed | Slugger | SageTV Customizations | 35 | 04-21-2008 08:12 AM |