Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Update_index function sometimes never returns
We have a continuously running process that updates our indexes throughout the day. Sometimes a call to update_index never returns. Is this something anyone has encountered before?
Also, it seems to to get stuck on the same tables, so that seems important.
Also, it seems to to get stuck on the same tables, so that seems important.
Comments
Do you know if anything bad can happen if you kill OI while it's in update_index?
If you care to investigate this situation on your own, then I recommend you first read this blog article:
Indexing in OpenInsight Part 2 - How index transactions get created
This will provide you a foundation that can help you identify the source of the corruption on your own.
Any process that updates an index, including the Update_Index routine, places a lock on the index table so only one process will ever be updating the index at the same time. So, if one Update_Index routine has hung with a lock, a second Update_Index routine might also get hung waiting for the lock to be released. I don't know the internals of that routine so I don't know if it times out if the lock doesn't become available in a reasonable amount of time. I suspect it just waits indefinitely.
BTW, if your table is that big, then it is likely your index table is heavily unbalanced (i.e., the OV file is significantly larger than the LK file). This would be a good opportunity to balance the files.