"Database file is locked by another process" error

I have been using Knime for years and this has not been an issue, but it has recently arisen and I’m really not sure how to solve it. At the end of my workflow, I am writing a Tableau .hyper source file and I keep getting the error:

Execute failed: error opening database ‘file_name’: There was an error during loading database: the database file is locked by another process: DatabaseId: “hyper.file:file_path\file_name.hyper” Context 0xd6232f85

When I actually look for that file in the folder it should be in, it’s gone…

My only solution so far is to create “file_name_2” instead and re-point all my Tableau work towards that. It’s fine for a few days, then it happens again. “file_name_2” disappears, I get the error and it’s time for “file_name_3” and more re-pointing. Any ideas what is going on and how to solve it? I’d like to avoid sequential file numbering as the solution! Thanks in advance.

Edit: As I posted this, I had the file path open and could see file_name_3 in front of me. I changed the .hyper output to file_name_3 (it’s a huge workflow which takes a long time to save so it was still getting the error on file_name). I got the warning that the output file exists. I chose to overwrite it…and got the error again. In the folder, file_name_3 has disappeared!

@JWebb do you overwrite the file or do you append data to an existing one. One option is to check for the existence and delete the file if it is there.


Medium: KNIME — Cases, Switches and Catching Errors

I always overwrite the file with a new one. It is only recently that this has started happening when overwriting. According to that node, to me and to my IT team, file_name_3.hyper doesn’t exist!

But, if I try and create it, it cannot be done because the file is locked by another process.

@JWebb maybe you can tell us more about your system. If it is a remote storage or cloud system. And did you try the delete before write example in my workflow?

1 Like