Stopping queries
If a query runs indefinitely, you may need to stop it. This page provides general guidelines for safely terminating queries in different TypeDB clients.
Is it safe to interrupt queries?
Yes. Read queries do not alter the database and can be stopped safely at any time. Schema and write queries also do not affect the database until they are committed, making it safe to terminate them as well.
Transaction close
The main way to interrupt a misbehaving query is to close the transaction.
Every transaction also opens with a default transaction timeout, which is 5 minutes. After the timeout, the server will automatically close the transaction. This provides some protection against both resource leaks (forgetting to close the transaction), and queries running for too long.
Stop a query through TypeDB clients
Currently, queries cannot be stopped from the client while execution runs on the server. (Leave us a note if this is an issue for you!) |