---
id: post/duiliotacconi-com/1717
type: post
title: LockTimeoutDuration in AL
summary: Starting with Business Central 2025 Wave 2 (v27), AL code can call Database.LockTimeoutDuration to raise or lower the lock timeout for a specific statement, overriding the global value (30 seconds online, 10 seconds in a v27 on-premises demo database). Setting it to 0 is capped by the platform at 1,710,000 ms (28.5 minutes). The author advises using it only for critical procedures, since low values cause more timeout errors and high values risk blocking chains and deadlocks.
tier: community
language: en
tags:
  - lock timeout
  - al development
  - database performance
  - concurrency control
  - transaction management
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:58:00.974Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 903ae935148674a53b6b876a07d649e1f726bcac040f3d049d53c195b2fc6fa1
evidence:
  - kind: blog
    url: https://duiliotacconi.com/2025/12/10/locktimeoutduration-in-al/
    title: LockTimeoutDuration in AL
    date: "2025-12-10"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://duiliotacconi.com/2025/12/10/locktimeoutduration-in-al/
    title: LockTimeoutDuration in AL
    date: "2025-12-10"
    commit: null
    t: null
    quote: "With great power (define a lock timeout) comes great responsibility (you are accountable of the consequences: good and bad)."
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "1717"
source_id: duiliotacconi-com
source_name: Duilio Tacconi
url: https://duiliotacconi.com/2025/12/10/locktimeoutduration-in-al/
published_at: "2025-12-10T16:04:37.000Z"
author: Duilio Tacconi
full_text: false
words: 920
quotes:
  - text: "With great power (define a lock timeout) comes great responsibility (you are accountable of the consequences: good and bad)."
    why_it_matters: This emphasizes that using this feature requires careful consideration to avoid introducing deadlocks and performance problems.
code_objects_mentioned:
  - other Database.LockTimeoutDuration Method
systems:
  - platform
  - development
  - administration
versions_mentioned:
  - "27"
  - 2025 Wave 2
preview:
  embeddable: true
  frame_url: https://duiliotacconi.com/2025/12/10/locktimeoutduration-in-al/embed/
  image: https://i0.wp.com/duiliotacconi.com/wp-content/uploads/2025/12/emma.jpg?fit=1200%2C692&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 692
  site_name: Dynamics 365 Business Central tales, myths, legends. And something serious.
  favicon: https://duiliotacconi.com/wp-content/uploads/2023/07/cropped-wordpress.png?w=32
  probed_at: "2026-10-07T11:50:51.561Z"
---

# LockTimeoutDuration in AL

[Read the post](https://duiliotacconi.com/2025/12/10/locktimeoutduration-in-al/) · Duilio Tacconi (Duilio Tacconi, MVP) · 2025-12-10 · 920 words · tier community · reviewed (checked by Opus)

> Starting with Business Central 2025 Wave 2 (v27), AL code can call Database.LockTimeoutDuration to raise or lower the lock timeout for a specific statement, overriding the global value (30 seconds online, 10 seconds in a v27 on-premises demo database). Setting it to 0 is capped by the platform at 1,710,000 ms (28.5 minutes). The author advises using it only for critical procedures, since low values cause more timeout errors and high values risk blocking chains and deadlocks.

## Key points

- Database.LockTimeoutDuration was introduced in BC 2025 Wave 2 (v27) to allow per-statement lock timeout overrides in AL code
- Online environments have a 30-second default timeout; on-premises defaults to 10 seconds from the $ndo$dbproperty table
- Lock timeout values are limited to a maximum of 1.71 million milliseconds (28.5 minutes), which is 10 percent below the command timeout to distinguish between lock and command timeouts
- Setting timeout values too low increases timeout errors and rollbacks; setting them too high risks deadlocks and blocking chains
- This feature should be used sparingly for specific business-critical procedures that encounter lock timeouts, not as a general solution to locking problems

## Quotes

- "With great power (define a lock timeout) comes great responsibility (you are accountable of the consequences: good and bad)." (This emphasizes that using this feature requires careful consideration to avoid introducing deadlocks and performance problems.)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- other "Database.LockTimeoutDuration Method"

## Context

- Features: lock timeout duration override, statement-level timeout configuration, database locking control
- Versions: 27, 2025 Wave 2

Source: Duilio Tacconi, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
