Is there a time delay on releasing a lock on a file?

26 views
Skip to first unread message

Herb.Sc...@gov.bc.ca

unread,
Aug 8, 2014, 2:15:26 PM8/8/14
to geop...@googlegroups.com
These schema locks are a pain in the butt!
 
I've got some code that loops through and does some calculations. I run the exact same code on the exact same data, sometimes it works no problem. Other times, it will crash. It crashes at the same piece of code, but it can crash at different times during the loop. In other words, it runs fine doing the same thing for a while, then for no explicable reason, decides that it's had enough and says, "I'm outta here, take this error code 000852 and leave me alone for a bit".
 
I have not been able to come up with any good reason, except that there is an existing lock on the file. And yet it has run for some time doing the same thing, so why didn't this lock issue occur on the second time through the loop? I can see the lock in explorer.
 
Does ANYONE know if there is a time delay that I should put in my code to slow it down to enable the lock enough time to be removed. Or is there another way to get around this frustrating locking issue?
 
If you are a Python smartypants and have any ideas, PLEASE let me know.
 
Thank you.
 
Cheers,
 
Herb

Herb.Sc...@gov.bc.ca

unread,
Aug 20, 2014, 12:33:44 PM8/20/14
to geop...@googlegroups.com, Herb.Sc...@gov.bc.ca
So anyways. I haven't received any responses. However, I have managed to find a work around. I'm using in_memory much more now instead of "writing files to disk". This seems to work well, although I don't have the luxury of using the intermediary files that I sometimes used. The in_memory does work quicker as well, so that's nice.
Reply all
Reply to author
Forward
0 new messages