A deadlock occurs when two or more tasks permanently block each other by each task having a lock on a resource which the other tasks are trying to lock. Both transactions in a deadlock will wait forever unless the deadlock is broken by an external process. This can happen for several reasons, and can happen on any type of server including sql servers. To avoid having an indefinite period of locking, Altru has built in a graceful way to stop the deadlock and provide an error message with the instruction to rerun the transaction.