KV Write Operations (put, including conditional) Hanging Indefinitely for Namespace

What is the name of the modal you’re running?

table-wise-reservation-checker

What is the error number?

The worker itself doesn’t receive a specific error number from the hanging KV put operation. The operation simply never completes.

What is the error message?

he primary logged error within the worker, caused by the hanging KV put, is: Error: Timeout: Acquiring lock > 5000ms

What is the issue or error you’re encountering

This issue occurs for both conditional writes (onlyIfNotExists: true or compare: { oldValue: undefined }) and even basic, unconditional writes (put with only expirationTtl).

What steps have you taken to resolve the issue?

Verified ENVIRONMENT=production variable is correctly set.

Verified KV namespace bindings (RESERVATIONS → ReservationsKV) are correct in the dashboard.

Upgraded from Workers Free to Workers Paid plan (issue persists).

Added extensive console.log diagnostics around all KV operations (put, get, getWithMetadata, locking attempts).

Isolated the hang:

Confirmed basic KV.put (no options) initially worked quickly (~300ms - see Request ID 486db…), proving write permissions are okay.

Confirmed KV.put with { onlyIfNotExists: true } hangs indefinitely (>5s).

Confirmed KV.put with { compare: { oldValue: undefined } } also hangs indefinitely (>5s).

Confirmed that now even basic KV.put with { expirationTtl: 15 } is also hanging indefinitely (>5s - see Request IDs 882c…, 9c10…).

Implemented various locking workarounds (PUT-then-GET, unsafe PUT); the underlying put operation continues to hang in recent tests.

Ensured the KV namespace ReservationsKV was empty before initiating tests.

Checked Cloudflare Status page (no relevant incidents reported during testing periods).

Observed the issue occurs in Cloudflare colos LHR and DUB.

What are the steps to reproduce the issue?

Ensure the Worker table-wise-reservation-checker (Script ID 7909b316-7849-43a5-bf02-2f92aba635f5 or latest deployed version based on message #50) is deployed. This version uses a simple, unconditional KV.put for locking.

Ensure the ReservationsKV namespace is empty.

Send a POST request to the worker URL: https://table-wise-reservation-checker.eugen-1e6.workers.dev/

Use the following JSON body:

{
“reservation_date”: “2025-03-30”,
“reservation_time”: “21:00:00”,
“Reservation_number_of_guests”: “6”
}
Use code with caution.
Json
Observe the Cloudflare Worker real-time logs for the corresponding Request ID.

Expected behavior: The log [LOCK_UNSAFE_TEST] UNSAFE PUT … completed… should appear within milliseconds.

Actual behavior: The log [LOCK_UNSAFE_TEST] Attempting UNSAFE… appears, but the completion log does not. Instead, after 5 seconds, the log Timeout Triggered: “Acquiring lock” > 5000ms. appears, followed by an error log and the worker returning HTTP 503.

Additional Information for Support:

Account ID: 1e6056e4e2a3c7d0b33997738fe8ae53

KV Namespace Name: ReservationsKV

KV Namespace ID: 0bd2f3443387472e8c6cabed429a31f9

Relevant Request IDs exhibiting the hang:

9c10fc19-1021-4383-be1c-c8e99dc4b041 (Basic put hang >5s)

882c20dd-0154-456a-9bd8-762d819d31ef (Basic put hang >5s)

92790ee20b42be36 (Compare put hang >5s)

f52349e8-e3d0-4fd8-b1f6-6d39ba322517 (onlyIfNotExists put hang >5s)

Worker Plan: Paid Plan

Subject: SEV1 - KV Service Outage in DUB Region (Account 1e6056e4e2a3c7d0b33997738fe8ae53)
Priority: Critical (Production Business Impact)

Evidence:

  1. Unconditional KV.put Failure:

    [LOCK_UNSAFE_TEST] PUT lock:2025-03-30:22:00 → 503 (Timeout)  
    Colo: DUB, Timestamp: 1743201215913
    
    
  2. Regional Pattern: 100% failure rate in DUB vs 0% in LHR (tested)

This topic was automatically closed after 15 days. New replies are no longer allowed.