- Reference >
- JavaScript Methods >
- db.killOp()
db.killOp()¶
-
db.
killOp
(opid)¶ Parameters: - opid – Specify an operation ID.
Terminates the specified operation. Use
db.currentOp()
to find operations and their corresponding ids. See Current Operation Reporting for full documentation of the output ofdb.currentOp()
.Note
You cannot use
db.killOp()
to kill a foreground index build.Warning
Terminate running operations with extreme caution. Only use
db.killOp()
to terminate operations initiated by clients and do not terminate internal database operations.