[API reference](https://evolu.dev/docs/api-reference) › [@evolu/sqlite-wasm](https://evolu.dev/docs/api-reference/sqlite-wasm) › [c-api](https://evolu.dev/docs/api-reference/sqlite-wasm/c-api) › sqlite3\_busy\_handler

```ts
function sqlite3_busy_handler(
  deps: SqliteWasmDep,
): (
  db: SqliteDbPtr,
  xBusy: 0 | SqliteFunctionPtr,
  pArg: 0 | WasmPtr,
) => SqliteResultCode;
```

Defined in: [packages/sqlite-wasm/src/CApi.ts:1270](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/CApi.ts#L1270)

Sets the connection's only busy handler, replacing any other, including the
one [sqlite3\_busy\_timeout](https://evolu.dev/docs/api-reference/sqlite-wasm/c-api/functions/sqlite3_busy_timeout) sets, or removes it for NULL so a lock fails
with SQLITE_BUSY at once. SQLite calls it with pArg and the number of earlier
calls for the same lock and retries while it returns non-zero; it must not
modify the connection.

Wasm type `i(iii)`. Signature `["sqlite3_busy_handler", "int", "sqlite3*",
"funcptr:i(pi)", "*"]` from SQLite's table.

See https://sqlite.org/c3ref/busy_handler.html.