---
title: Troubleshooting “Execution Timeout Expired” and “Query Timeout Expired” Errors Using SSMS
description: Timeout errors may occur when attempting to add, edit, or save transactions. The following information may help if you are receiving a lot of timeout errors throughout many areas of the software.
---

[Skip to content](https://hub.acctivate.com/articles/execution-timeout-expired-query-timeout-expired-errors#main-content)

[Go to Customer Portal](https://hub.acctivate.com/tickets?hsLang=en)

![Acctivate - A CAI Solution](https://hub.acctivate.com/hubfs/Images/Logos/acctivate-cai-logo-svg.svg)

- [Knowledge Base](https://hub.acctivate.com/articles)

Open main navigation

Close main navigation

- [Knowledge Base](https://hub.acctivate.com/articles)
- [Go to Customer Portal](https://hub.acctivate.com/tickets)
- [Support Resources / Create Ticket](https://acctivate.com/support)

[Support Resources / Create Ticket](https://acctivate.com/support)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://hub.acctivate.com/articles?hsLang=en)
2. [Troubleshoot](https://hub.acctivate.com/articles/troubleshoot?hsLang=en)
3. [Database](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#database)

November 21, 2025

# Troubleshooting “Execution Timeout Expired” and “Query Timeout Expired” Errors Using SSMS

## Timeout errors may occur when attempting to add, edit, or save transactions. The following information may help if you are receiving a lot of timeout errors throughout many areas of the software.

When Acctivate users attempt to **add**, **edit**, or **save** transactions, such as Sales Orders, Receipts, Invoices, or Inventory updates, they may occasionally receive one of the following messages:

- **Execution Timeout Expired**
- **Query Timeout Expired**

These symptoms are commonly caused by **blocking** or an **escalated lock** inside the Acctivate database which is powered by Microsoft SQL Server. This guide explains how to use **Microsoft SQL Server Management Studio (SSMS)** to identify and troubleshoot the blocking process that is responsible for the timeout errors.

### Why This Happens

Acctivate uses SQL Server to process every transaction. If one SQL session holds a lock on a table for too long - because of a long-running transaction, report, sync, or other process - other sessions must wait. If the wait exceeds the command timeout, the user receives a timeout error.

The most common underlying cause is:

- A **table-level escalated lock**
- A **user task or SQL job** that is stuck or running longer than normal
- A **custom trigger** or process keeping records locked

### Solution

When users receive **Execution Timeout Expired** or **Query Timeout Expired** errors in Acctivate, the root cause is often SQL blocking or an escalated lock. By tracing the **BlkBy** chain in SSMS and identifying the head-blocking SPID, you can quickly determine:

- Which process is causing the lock
- Which workstation/user is running it
- Whether to let it complete or terminate it

### Step-by-Step Troubleshooting

Your goal is to **identify the head-blocking SPID**, determine what it is doing, and decide whether it should be allowed to finish or manually terminated.

### 1. Connect to the Acctivate Database Server

You can download and [install Microsoft SQL Server Management Studio (SSMS)](https://learn.microsoft.com/en-us/ssms/install/install) if you don't already have it.

1. Launch **SQL Server Management Studio**.
2. **Connect to the SQL Server** instance hosting the Acctivate database (e.g., `SERVERNAME\ACCTIVATE` or similar).
3. You can probably **connect using Windows Authentication** if you're on the database server. Otherwise, you'll need to obtain your database server credentials.

### 2. Identify the Server Process ID (SPID) that's blocking us

You can use either method. Both will show you which SQL sessions are being blocked and by whom.

#### Option A: Using Activity Monitor

1. In Object Explorer, right-click the **Server Name** → **Activity Monitor**.
2. Expand the **Processes** pane.
3. Ensure the following columns are visible: 
     1. **Blocked By**
     2. **ID** (SPID)
     3. **Host Name**
     4. **Login**
4. Look for sessions where: **Blocked By** is **not empty** or **not 0**. These represent Acctivate sessions waiting for another SPID to release its loc

#### Option B: Using sp\_who2

1. Click **New Query**.
2. Run: `EXEC sp_who2`
3. Look for rows where **BlkBy** contains a number instead of `0` or `NULL`

Example:

| SPID | BlkBy | Status | Login | HostName |
| --- | --- | --- | --- | --- |
| 60 | 55 | RUNNABLE | sa | USER-PC |

This means **SPID 60 is blocked by SPID 55**.

### 3. Trace the Blocking Chain to Find the Head Blocker

Follow the blocking path until you find the SPID that is blocking others but not blocked itself:

1. Start with any SPID showing a non-zero **BlkBy**.
2. Look up the SPID listed in **BlkBy**.
3. Check **that** SPID’s **BlkBy** value.
4. Continue until you reach a SPID with **BlkBy = 0** (or blank).

This is the **head-blocking SPID** - the one causing the timeout errors in Acctivate.

### 4. Determine What the Blocking SPID Is Doing

Once you know the head-blocking SPID, identify the activity behind it.

#### Option A: Using Activity Monitor

1. Locate the SPID in **Processes**.
2. Review: 
     1. **Host Name** – workstation running the query
     2. **Login** – user identity
     3. **Application** – Acctivate or another app
3. Right-click → **Details** to view the current SQL command.

#### Option B: Using DBCC INPUTBUFFER

#### Run the following command in SSMS, replacing \<SPID\> with the SPID number.

####  DBCC INPUTBUFFER(\<SPID\>)

This shows the last SQL statement issued by that session. Often you will see an Acctivate query, report query, or update process.

#### Option C: Using Dynamic Management Views (More Detailed)

 Again, replace \<SPID\> with the SPID number from above.

```
SELECT    r.session_id,    s.login_name,    s.host_name,    r.status,    r.blocking_session_id,    r.wait_type,    r.wait_time,    SUBSTRING(t.text,        (r.statement_start_offset/2) + 1,        ((CASE r.statement_end_offset              WHEN -1 THEN DATALENGTH(t.text)              ELSE r.statement_end_offset          END - r.statement_start_offset)/2) + 1) AS CurrentStatement,    t.text AS FullBatchTextFROM sys.dm_exec_requests rJOIN sys.dm_exec_sessions s ON r.session_id = s.session_idCROSS APPLY sys.dm_exec_sql_text(r.sql_handle) tWHERE r.session_id = <SPID>
```

This shows the running command, duration, and source.

### 5. Decide the Correct Action

### ✔ Allow It to Finish

Recommended when:

1. It’s a legitimate Acctivate task (e.g., posting, sync, import)
2. It is progressing or expected to complete normally

### ✔ Contact the User

If the SPID corresponds to a workstation:

1. Ask the user what they were doing (running a report, leaving a window open, etc.)
2. Ask them to close or cancel the process

### ⚠ Kill the SPID (Last Resort Only)

If the blocking is severe and urgent:

`KILL <SPID>`

**Important:** Killing a SPID triggers a **rollback**, which may temporarily cause *more* blocking until the rollback completes.

### 6. Gather Information for Acctivate Support

If the blocking is repeatable or caused by a consistent procedure, collect the following information and share with the Acctivate support team:

- **Host name** and **login**
- The **SQL statement** (from Activity Monitor or INPUTBUFFER)
- Screen captures of Activity Monitor or `sp_who2`
- Description of where the timeout occurred in Acctivate
- Any additional information from the user(s)

- [Getting Started](https://hub.acctivate.com/articles/getting-started?hsLang=en#main-content)

    - [Basics](https://hub.acctivate.com/articles/getting-started?hsLang=en#basics)
    - [User Interface](https://hub.acctivate.com/articles/getting-started?hsLang=en#user-interface)
    - [Manager windows](https://hub.acctivate.com/articles/getting-started?hsLang=en#manager-windows)
    - [List windows](https://hub.acctivate.com/articles/getting-started?hsLang=en#list-windows)
    - [Transaction windows](https://hub.acctivate.com/articles/getting-started?hsLang=en#transaction-windows)
    - [License and Users](https://hub.acctivate.com/articles/getting-started?hsLang=en#license-and-users)
    - [Email](https://hub.acctivate.com/articles/getting-started?hsLang=en#email)
    - [Getting Help](https://hub.acctivate.com/articles/getting-started?hsLang=en#getting-help)
- [Installation](https://hub.acctivate.com/articles/installation?hsLang=en#main-content)

    - [Acctivate](https://hub.acctivate.com/articles/installation?hsLang=en#acctivate)
    - [Database Server](https://hub.acctivate.com/articles/installation?hsLang=en#database-server)
    - [Mobile WMS Setup](https://hub.acctivate.com/articles/installation?hsLang=en#mobile-wms-setup)
    - [Software Updates](https://hub.acctivate.com/articles/installation?hsLang=en#software-updates)
    - [Email Setup](https://hub.acctivate.com/articles/installation?hsLang=en#email-setup)
    - [Remote Access](https://hub.acctivate.com/articles/installation?hsLang=en#remote-access)
- [Configuration](https://hub.acctivate.com/articles/configuration?hsLang=en#main-content)

    - [Basics](https://hub.acctivate.com/articles/configuration?hsLang=en#basics)
    - [Users](https://hub.acctivate.com/articles/configuration?hsLang=en#users)
    - [Company Info](https://hub.acctivate.com/articles/configuration?hsLang=en#company-info)
    - [Customers](https://hub.acctivate.com/articles/configuration?hsLang=en#customers)
    - [Sales Orders](https://hub.acctivate.com/articles/configuration?hsLang=en#sales-orders)
    - [Inventory](https://hub.acctivate.com/articles/configuration?hsLang=en#inventory)
    - [Custom Fields](https://hub.acctivate.com/articles/configuration?hsLang=en#custom-fields)
    - [Email Message Templates](https://hub.acctivate.com/articles/configuration?hsLang=en#email-message-templates)
    - [Services](https://hub.acctivate.com/articles/configuration?hsLang=en#services)
- [Inventory](https://hub.acctivate.com/articles/inventory?hsLang=en#main-content)

    - [Products](https://hub.acctivate.com/articles/inventory?hsLang=en#products)
    - [Costing](https://hub.acctivate.com/articles/inventory?hsLang=en#costing)
    - [Prices and Units](https://hub.acctivate.com/articles/inventory?hsLang=en#prices-and-units)
    - [Warehouses and Locations](https://hub.acctivate.com/articles/inventory?hsLang=en#warehouses-and-locations)
    - [Lot Numbers](https://hub.acctivate.com/articles/inventory?hsLang=en#lot-numbers)
    - [Inventory Manager](https://hub.acctivate.com/articles/inventory?hsLang=en#inventory-manager)
    - [Receipts](https://hub.acctivate.com/articles/inventory?hsLang=en#receipts)
    - [Assemblies](https://hub.acctivate.com/articles/inventory?hsLang=en#assemblies)
    - [Kits and Assortments](https://hub.acctivate.com/articles/inventory?hsLang=en#kits-and-assortments)
    - [Landed Cost](https://hub.acctivate.com/articles/inventory?hsLang=en#landed-cost)
    - [Transfers](https://hub.acctivate.com/articles/inventory?hsLang=en#transfers)
    - [Adjustments](https://hub.acctivate.com/articles/inventory?hsLang=en#adjustments)
    - [Counts](https://hub.acctivate.com/articles/inventory?hsLang=en#counts)
    - [Reports](https://hub.acctivate.com/articles/inventory?hsLang=en#reports)
- [Purchasing](https://hub.acctivate.com/articles/purchasing?hsLang=en#main-content)

    - [Purchase Orders](https://hub.acctivate.com/articles/purchasing?hsLang=en#purchase-orders)
    - [Purchase Order Manager](https://hub.acctivate.com/articles/purchasing?hsLang=en#purchase-order-manager)
    - [Purchase Invoices](https://hub.acctivate.com/articles/purchasing?hsLang=en#purchase-invoices)
    - [Vendors](https://hub.acctivate.com/articles/purchasing?hsLang=en#vendors)
- [Customers](https://hub.acctivate.com/articles/customers?hsLang=en#main-content)

    - [Customers](https://hub.acctivate.com/articles/customers?hsLang=en#customers)
    - [Locations](https://hub.acctivate.com/articles/customers?hsLang=en#locations)
    - [Credit & Terms](https://hub.acctivate.com/articles/customers?hsLang=en#credit-terms)
    - [Pricing](https://hub.acctivate.com/articles/customers?hsLang=en#pricing)
    - [Broadcast Email](https://hub.acctivate.com/articles/customers?hsLang=en#broadcast-email)
- [Sales](https://hub.acctivate.com/articles/sales?hsLang=en#main-content)

    - [Orders](https://hub.acctivate.com/articles/sales?hsLang=en#orders)
    - [Sales Order Manager](https://hub.acctivate.com/articles/sales?hsLang=en#sales-order-manager)
    - [Picking](https://hub.acctivate.com/articles/sales?hsLang=en#picking)
    - [Drop Shipments](https://hub.acctivate.com/articles/sales?hsLang=en#drop-shipments)
    - [Sales Tax](https://hub.acctivate.com/articles/sales?hsLang=en#sales-tax)
    - [Packaging](https://hub.acctivate.com/articles/sales?hsLang=en#packaging)
    - [Shipping](https://hub.acctivate.com/articles/sales?hsLang=en#shipping)
    - [Invoices](https://hub.acctivate.com/articles/sales?hsLang=en#invoices)
    - [Payments](https://hub.acctivate.com/articles/sales?hsLang=en#payments)
    - [Credits](https://hub.acctivate.com/articles/sales?hsLang=en#credits)
- [Business Activities](https://hub.acctivate.com/articles/business-activities?hsLang=en#main-content)

    - [Business Activities](https://hub.acctivate.com/articles/business-activities?hsLang=en#business-activities)
    - [Business Alerts](https://hub.acctivate.com/articles/business-activities?hsLang=en#business-alerts)
- [QuickBooks](https://hub.acctivate.com/articles/quickbooks?hsLang=en#main-content)

    - [Basics](https://hub.acctivate.com/articles/quickbooks?hsLang=en#basics)
    - [QuickBooks Online](https://hub.acctivate.com/articles/quickbooks?hsLang=en#quickbooks-online)
    - [QuickBooks Desktop](https://hub.acctivate.com/articles/quickbooks?hsLang=en#quickbooks-desktop)
- [Mobile WMS](https://hub.acctivate.com/articles/mobile-wms?hsLang=en#main-content)

    - [Basics](https://hub.acctivate.com/articles/mobile-wms?hsLang=en#basics)
    - [Picking](https://hub.acctivate.com/articles/mobile-wms?hsLang=en#picking)
    - [Receiving](https://hub.acctivate.com/articles/mobile-wms?hsLang=en#receiving)
    - [Counts](https://hub.acctivate.com/articles/mobile-wms?hsLang=en#counts)
    - [Assemblies](https://hub.acctivate.com/articles/mobile-wms?hsLang=en#assemblies)
- [Web Store Integrations](https://hub.acctivate.com/articles/web-store-integrations?hsLang=en#main-content)

    - [Basics](https://hub.acctivate.com/articles/web-store-integrations?hsLang=en#basics)
    - [Templates and Options](https://hub.acctivate.com/articles/web-store-integrations?hsLang=en#templates-and-options)
- [EDI](https://hub.acctivate.com/articles/edi?hsLang=en#main-content)

    - [Basics](https://hub.acctivate.com/articles/edi?hsLang=en#basics)
    - [Orders - 850](https://hub.acctivate.com/articles/edi?hsLang=en#orders-850)
    - [Shipments - 856](https://hub.acctivate.com/articles/edi?hsLang=en#shipments-856)
    - [Invoices - 810](https://hub.acctivate.com/articles/edi?hsLang=en#invoices-810)
    - [Warehouse - 940/945](https://hub.acctivate.com/articles/edi?hsLang=en#warehouse-940-945)
- [Reports](https://hub.acctivate.com/articles/reports?hsLang=en#main-content)

    - [Basics](https://hub.acctivate.com/articles/reports?hsLang=en#basics)
    - [Standard Reports](https://hub.acctivate.com/articles/reports?hsLang=en#standard-reports)
    - [Crystal Reports](https://hub.acctivate.com/articles/reports?hsLang=en#crystal-reports)
    - [Excel](https://hub.acctivate.com/articles/reports?hsLang=en#excel)
- [Database](https://hub.acctivate.com/articles/database?hsLang=en#main-content)

    - [Basics](https://hub.acctivate.com/articles/database?hsLang=en#basics)
    - [Backup & Restore](https://hub.acctivate.com/articles/database?hsLang=en#backup-restore)
    - [Microsoft SQL Server](https://hub.acctivate.com/articles/database?hsLang=en#microsoft-sql-server)
    - [Imports](https://hub.acctivate.com/articles/database?hsLang=en#imports)
- [Troubleshoot](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#main-content)

    - [General](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#general)
    - [Installation](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#installation)
    - [Inventory](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#inventory)
    - [Purchasing](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#purchasing)
    - [Sales](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#sales)
    - [Shipping](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#shipping)
    - [QuickBooks Desktop](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#quickbooks-desktop)
    - [QuickBooks Online](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#quickbooks-online)
    - [Mobile WMS](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#mobile-wms)
    - [Web Store Integration](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#web-store-integration)
    - [EDI](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#edi)
    - [Reports](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#reports)
    - [Database](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#database)
    - [Imports](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#imports)
    - [Email](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#email)
    - [Integrations](https://hub.acctivate.com/articles/troubleshoot?hsLang=en#integrations)

[![Acctivate Inventory Software](https://hub.acctivate.com/hubfs/Images/Logos/acctivate-cai-logo-svg.svg "Acctivate Inventory Software")](https://acctivate.com)

Acctivate Knowledge Base

<https://www.twitter.com/acctivate> <https://www.linkedin.com/company/alterity-inc-/> [mailto:support@acctivate.com](mailto:support@acctivate.com)

Copyright © 2025, Alterity, LLC