Page 1 of 1

TI Process Read Lock on CSV Source File

Posted: Thu Dec 14, 2017 9:34 pm
by ascheevel
Has anyone run into a TI process not releasing its read lock on a csv or txt file after completion? The offending file is one that is used for export from one TM1 server and import to another. I use RunTi to call the export and import and run the processes sequentially so I know it's not a case of the import running when the export is still executing. I've tried changing the file name, changing extension, changing file location, and setting up a 10 second wait between export completion and import start, but eventually the file will get locked in read only again. Our server has virus protection turned off for the selected area, that was my first suspicion. A restart of the TM1 server that the import process is on will release the lock and I'm able to export to the original file again.

TM1 won't generate a process error if it can't overwrite a file, so I test it in the export process prolog by trying to delete the target file, wait 5 seconds, and test if it still exists. It's crude, but it lets me know when I need to change the file name for continued use that day.

I might replace this process with a rest call, but I thought I'd ask if anyone else has experienced something similar as I don't foresee the rest api replacing our heavier transfers between TM1 servers.

*running Planning Analytics 2.0 on windows server 2012 64bit; all export/import files are saved to a share drive on a separate server; so far this is the only process/file with this issue

Re: TI Process Read Lock on CSV Source File

Posted: Fri Dec 15, 2017 1:19 am
by BariAbdul
Have you checked the log files,What does it says? There is similar issue here, might help:
http://www.tm1forum.com/viewtopic.php?t=13433 Thanks

Re: TI Process Read Lock on CSV Source File

Posted: Fri Dec 15, 2017 12:42 pm
by ascheevel
Thanks for the reply BariAbdul, the log file only has a sf_File: DeleteFileError when trying to run the export TI process. I know that the import TI process is the one that has the read lock on the file. Thank you for linking that other thread, I'd tried most there except command line to manage separate export/import files. Since the import process is the one with the lock and I don't believe i can delete the file in the epilog of the process reading it (will run into same file access issues). I don't think a simple copy/replace of the import file will fix my issue, but I'm trying something similar: I'll use a separate export/import files, but the import file will be unique every time the process runs. In the prolog, the process will assign a random number to a file name, execute a command to copy the export file to the unique import file, delete old import files, and then change datasource for TI process to be the new unique import file. Doesn't fix the issue long term or prevent from happening elsewhere, but hopefully it will reduce the number of headaches caused by this one process.

Re: TI Process Read Lock on CSV Source File

Posted: Wed Dec 20, 2017 8:08 am
by Drg
export server (E)
import server (I)

Do I understand correctly that you are launching the process of an import from the server E within the expot process?
if it is so try launch RUNTI without waiting for an answer executecommand(, 0);