Page 1 of 1

TM1 Chore restarts multiple times over when if finishes / part finishes

Posted: Wed Mar 02, 2016 12:35 am
by 7Zark7
Hi All,

We have encountered an issue where our a Single TM1 chore runs then finishes / part finishes and then restarts automatically.

Before I raise a PMR with IBM, Has anyone seen this behavior before? And does anyone know how to resolve the issue? Chore has been running fine for last year or so and for what ever reason the chore just keeps looping over and over.

Cheers

Zark

Re: TM1 Chore restarts multiple times over when if finishes / part finishes

Posted: Wed Mar 02, 2016 12:51 am
by Alan Kirk
7Zark7 wrote: We have encountered an issue where our a Single TM1 chore runs then finishes / part finishes and then restarts automatically.

Before I raise a PMR with IBM, Has anyone seen this behavior before? And does anyone know how to resolve the issue? Chore has been running fine for last year or so and for what ever reason the chore just keeps looping over and over.
You're showing version 9.1 SP3 in your profile; is that still correct or have you just forgotten to update it?

The reason I mention it is twofold:
(a) First, a PMR won't get you anywhere if you are because support for anything before 10.1 is now extinct; and
(b) The locking model in ye olde versions was more primitive, and if you are still on that version you could be having a rollback situation. (Search the Operations Guide for the term "rollback" for more details.)

Re: TM1 Chore restarts multiple times over when if finishes / part finishes

Posted: Wed Mar 02, 2016 5:33 am
by ByronB
Hi,

Could you check if your TI are calling the "Securityrefresh;" function ?

The SecurityRefresh can block the operation and that can cause rollback if it can't acquire the block.

I've seen this behavior twice, a TI was looping several times because there was a SecurityRefresh in the epilogue

Removing the SecurityRefresh; from the TI and putting the SecurityREfresh in a separate TI fixed this issue

Cheers,

Re: TM1 Chore restarts multiple times over when if finishes / part finishes

Posted: Wed Mar 02, 2016 7:15 am
by 7Zark7
Hi Guys,

On the latest version well not the latest but on 10.2.2. This could be it:

"a TI was looping several times because there was a SecurityRefresh in the epilogue
Removing the SecurityRefresh; from the TI and putting the SecurityREfresh in a separate TI fixed this issue"

We recently added a new process, that has this very function. I will test this out and report back my results! I am hoping this is it. I have never every come across this. Why on earth would something like that create a loop effect?

ByronB, did IBM offer an explanation as to why this would happen??

Cheers

Zark

Re: TM1 Chore restarts multiple times over when if finishes / part finishes

Posted: Wed Mar 02, 2016 10:26 am
by qml
7Zark7 wrote:I have never every come across this. Why on earth would something like that create a loop effect?
SecurityRefresh is one of those functions that need to obtain exclusive locks on quite a large number of objects. If other threads (user queries other TIs) are holding these locks then we have lock contention. The TM1 server in most cases attempts to resolve such contentions by doing a rollback and a restart of one or more of the clashing threads in order to release all the locks already held so that other threads requesting them have a chance to grab them and finish. This is not a perfect mechanism (in fact it has quite a low IQ) and sometimes multiple rollbacks of the same TI process can happen, even ad infinitum. SecurityRefresh is definitely one of the things that have the biggest potential to cause such process thrashing, but there others too.

Many people claim that feeders are the most difficult aspect of TM1 development. I would say the server's locking model is much, much harder to master and at least as important as feeders. The more complex your application is, the more users and jobs it has, the more important it becomes to understand locking and design the model around it.

Re: TM1 Chore restarts multiple times over when if finishes / part finishes

Posted: Thu Mar 03, 2016 7:42 am
by 7Zark7
Hi All,

I can confirm from my testing that "SecurityRefresh in the epilogue" in one of my processes batched up within a chore is per what qlm has kindly put together
is performing a rollback and restart of chore over and over again. Instead of writing it into the epilogue directly I have used EXECUTEPROCESS and call the process instead which has fixed the issue.

Thanks to ByronB for providing the initial solution.

Cheers

Zark

Re: TM1 Chore restarts multiple times over when if finishes / part finishes

Posted: Mon Mar 07, 2016 7:56 pm
by 7Zark7
Morning All,

It appears that using EXECUTEPROCESS to call the process instead is not working and the rollback occurs. Therefore securityRefresh should be setup in a separate TI process following after the initial one per ByronB initial suggestion. I will have to test run this further. Hopefully this provides the fix.

Cheers

Zark

Re: TM1 Chore restarts multiple times over when if finishes / part finishes

Posted: Tue Mar 08, 2016 10:44 pm
by EvgenyT
Hi All,

We have encountered an issue where our a Single TM1 chore runs then finishes / part finishes and then restarts automatically.

Before I raise a PMR with IBM, Has anyone seen this behavior before? And does anyone know how to resolve the issue? Chore has been running fine for last year or so and for what ever reason the chore just keeps looping over and over.
Hi Zak,

From many experiences, functions like SaveDataAll / SecurityRefresh should always be in a separate process when executed, as part of the chore.
Lock will not be fully released until TI commits its changes in Epilog, hence why using ExecuteProcess is causing you a headache as well.

Have a look at Lock Contention Management document (IBM), which explains a lot about TM1 lock model and how to deal with this sort of issues.

Many Thanks

ET