Delete Files from Repository

Hello,

i use the KNIME repository to store some files (2-8 mb each file, average ~3mb, amount of files ~1500).

To delete files i use the DELETE Request Node.
Input table:

http://server:port/knime/rest/v4/repository/file0?deletePermanently=false

http://server:port/knime/rest/v4/repository/file1?deletePermanently=false

http://server:port/knime/rest/v4/repository/file2?deletePermanently=false

etc…

this works fine with a couple of files.

If i try to delete 200-300 files the knime web-server-service crashes.

Anyone aware of this problem, or is there another way to delete the files?

Server: 4.10

Executor: 4.1

Hi @Tim8200 , try to delete in chunks instead, and add a wait between the loop iterations.

Something like this:
image

You can configure how many files you want to delete at a time in the Chunk Loop Start:
image

For my example, I did 2 at a time since I don’t have a lot of records in my list of file, but you could do 100 at a time in your case.

And the Wait node can be configured like this:
image

I set a 5 seconds delay between each batch, you can set it to whatever works for your server.

Here’s the workflow:
Delete Files from Repository.knwf (13.6 KB)

3 Likes