Page 2 of 2

Re: How to cancel a thread that cannot be cancelled in TM1 Top

Posted: Fri Apr 28, 2017 4:17 pm
by npatel27
Does your idle connection parameter have to be changed to any particular value? For example, let's say the thread has been stuck for 3200 seconds and the parameter is set to 3600. Do I need to change it to something < 3200 seconds for that thread to get canceled?

Re: How to cancel a thread that cannot be cancelled in TM1 Top

Posted: Wed Aug 08, 2018 7:59 am
by HyunaHyuna
Tried this solution when we had parallel loads stuck because of a cube dependency being established while running. Unfortunately, it didn't work in that case. I wonder if it doesn't work when used for locks happening during parallel interaction, or just with locks caused by establishing cube dependency. Will update if I find out.

Re: How to cancel a thread that cannot be cancelled in TM1 Top

Posted: Wed Aug 08, 2018 8:28 am
by paulsimon
Hi

This method is specific to the ChangeSetUndo. If you look in TM1Top it will actually say ChangeSetUndo.

Unfortunately in TM1 Top you can only cancel a thread when an API operation has completed. Some API operations are very short eg update a cell and some are very long eg create a view. It can only cancel when the API operation has completed, before the next one starts.

I am not clear about your exact situation. Did you try cancelling both threads, the one loading data and the one establishing the cube dependency?

As you may know, the longer term answer is to add to use the AddCubeDependency statement in a process run from a Startup Chore

Regards

Paul Simon

Re: How to cancel a thread that cannot be cancelled in TM1 Top

Posted: Wed Aug 08, 2018 9:23 am
by HyunaHyuna
Hi Paul, thank you for your reply!

Our situation happened because we changed a line in a rule, and did not establish cube dependencies (we are relatively new to parallel interaction, and still struggle with how to determine what dependencies are needed in each case) before running a night load in parallel. I think these tasks stuck in "wait" are the threads that establish the dependencies, since in the server logs the last line I can see that was added for this load is the line:

Code: Select all

TM1.Cube.Dependency   Adding cube dependency: Cube 'A' depends on cube '}ElementAttributes_B'
We tried cancelling every thread that was running from TM1Top (unfortunately, we don't have OpsConsole), and we succeeded with most, but it is hard to determine which are the ones that establish the dependencies, and which are the ones that load. However, there was one thread that would not cancel, causing all the chores to get stuck in "wait".

Interestingly enough, sometimes (this is the third time we ran into this problem) simply killing the "wait" tasks works, they cancel and then we could restart the processes. In some cases, however, the task would not get cancelled, and we have to do a server reboot. I have not been able to pinpoint what was different in these cases, unfortunately.

I have tried adding AutomaticallyAddCubeDependencies=T to the tm1s.cfg file, but it doesn't seem to work for rule changes, some dependencies are not added. If you have any advise for me on how to avoid this in the future (our current plan of action is: when a rule is changed, run a quick load to and from the cube, to establish cube dependencies before these are ran in parallel), I would be really grateful. Is there some good white paper on how to determine dependencies when changing rules? I have tried googling, but did not find anything really useful. (Sorry if this is offtopic, I have tried asking in a different thread, but didn't manage to get replies)

Thank you in advance, and please excuse me if I left out some critical information!

Re: How to cancel a thread that cannot be cancelled in TM1 Top

Posted: Wed Aug 08, 2018 9:54 am
by Steve Rowe
There are some releases of TM1, 10.2.X roughly where the cube dependency automation on the server ignores attribute references, the PA series corrects this and so they shouldn't get missed.

Not sure if the "fix" made it into the late 10.2.2 series.

Re: How to cancel a thread that cannot be cancelled in TM1 Top

Posted: Wed Aug 08, 2018 10:50 am
by HyunaHyuna
Thank you for this info! We are moving to PA in the near future, so we'll just be extra careful till then. Kudos to you!