Hi there, I have a main job setup with three tasks Import, PageId and Profiler. All of them are running through rulerunner. In Datacap Navigator I see rulerunner is creating many Import tasks every day and since it doesn’t have any documents to process they are all left in running state forever. I have a single thread assigned for Import task. I have followed this article from IBM site and have changed my settings accordingly. http://www-01.ibm.com/support/docview.wss?uid=swg21618564 My only concern is how do I make sure that rulerunner only creates a batch when it finds a document in the specified folder or how do I manage all the running Import batches so that in Job Monitor is not overwhelmed? Please let me know if I have missed anything.
Thanks
Answer by yanglo (1141) | Jul 26, 2018 at 01:15 PM
Several different things:
That online article is correct to specify turning off/un-checking Mixed Queue in Rulerunner's settings. If you have done it and restarted Rulerunner afterwards, you should (start to) see only one empty but running batch at any given time. In your screenshot, many of these empty/running batches are showing, but were created on various dates. So, you need to clean them up to avoid confusion.
However, Rulerunner will always create an empty/running batch to wait for the next (group of) file(s) to show up, which is its current design. If you want it to behave differently, you need to open an ER, to which I believe many have for this very same situation.
Furthermore, the very first (group of) file(s) today will be imported into the very last batch dated yesterday, as it works as explained, unless you use a scheduler to stop/(re-)start Rulerunner.
Answer by tpatel234 (3) | Jul 26, 2018 at 03:02 PM
I will keep the default behavior of rulerunner creating an empty batches and if business decides to change it, I will open an ER.
With the current rulerunner design, can I use my version of NENU application to delete old dated running batches?
The short answer is yes, but you still need to shut down Rulerunner first to avoid any conflict or access issue.
Can I change a timing of how often rulerunner will look for the file in the folder and create a new batch?
Answer by RickWilson (6949) | Jul 26, 2018 at 07:23 PM
Rulerunner should not be leaving multiple tasks in the running state. This is not an enhancement. Something is wrong. The most common cause of this issue is that the skipsamebatch option is not set to 1 as explained in the Technote. However there are other causes. If you have rrs logging turned on in Rulerunner, check the log to see if there is an error or crash of some kind. Also recognize that changing a running batch back to pending (or any other state) involves the Rulerunner thread making the request back to the Taskmaster service, which writes it back to the database. If something is interfering with one of those handoffs, then that could also cause this issue. See if you can capture an event where the batch was not set back to pending and check the Rulerunner and tms logs to see if there might have been a problem getting the database record for the batch set to Pending.
Answer by tpatel234 (3) | Jul 30, 2018 at 03:02 PM
After changing one of the batch from running to pending status, I saw I had two jobs in Pending status for a while. Around 10 mins later that jobs status was changed back to running automatically.
In my tms log file I have found few 'Execute Failed' and 'will close connection' error message. Please see attached screenshots.
Answer by RickWilson (6949) | Jul 30, 2018 at 07:17 PM
I would not assume that the connection error is specifically the cause of this issue unless you can show direct time correlations between both sides of the logs. The expectation if you were getting intermittent connection errors would be that any task might give you those errors. The fact that it is specifically the Import task in the running state suggests that the issue is something else.
You state that the batch eventually went back to the running state but of itself this is correct. As the import task polls for files, it actually goes back and forth between pending and running. However, most of the time it will be running, so periodic refreshes of the Job Monitor will show it as always running.
If you have multiple running Import tasks, this would indicate that tasks are not completing in some way. Use your rrs and Rulerunner logs to see what happened.
Answer by tpatel234 (3) | Jul 31, 2018 at 12:34 PM
I don't know the frequency for rulerunner to look for the file in the directory but every time it does, rulerunner writes into rrs log files so I have same messages repeatedly written into the file.
Other that that I am unable to find any errors or unusual things.
Answer by tpatel234 (3) | Jul 31, 2018 at 12:37 PM
Is there any settings in rulerunner which I can change and tells rulerunner to keep the batch in pending mode until it has next file to process? right now, after certain time it changes pending batch into running even though it doesnot have any file to process and creates a new batch in pending status.
Answer by RickWilson (6949) | Aug 01, 2018 at 07:54 PM
The batch checks to see if there are any files by running rules. To run rules it must be in a running state. So the answer to your question is no, a batch can not check for files but remain in the pending state.
Is it recommended to add multiple applications to one rulerunner thread? 1 Answer
How to prevent rulerunner from creating record on Engine DB, taskstats table? 3 Answers
VScan Job in Rulerunner 2 Answers
Locked *.tmp files when polling images with Rulerunner (aka Quattro) and VScan task in Datacap 8.1 6 Answers
Rulerunner Configuration: one thread with multiple Vscan tasks 1 Answer