Completion of the process in the DB node in a certain time

Hello everyone. An interesting case has recently arisen. The process is frozen in the DB Reader node. That is, now it was necessary to manually stop-complete the process. Now the question arises. How to make it so that if the process does not work in 10-15-20minutes, make the process stop on its own?