Skip to content

High CPU Usage After AofPageSize Exceeded on Subsequent Gets with Same Key #1749

Description

@rdavisunr

Describe the bug

When attempting to set a value larger than the configured AofPageSize (default 4MB) with AOF enabled, an exception is thrown (Tsavorite.core.TsavoriteException: Entry does not fit on page) and the connection is closed.

After this, subsequent attempts to GET the same key result in the Garnet server consuming excessive CPU. The high CPU usage persists even after the client disconnects, and the server must be restarted to recover.

It is unclear if closing the connection in this scenario is expected behavior? The GET operations also appear to block.

A small sample program that reproduces the issue is attached.

Steps to reproduce the bug

  1. Start Garnet v1.1.5 with the following configuration:
{
    "EnableAOF": true,
    "Recover": true
}
  1. Build and run the attached sample C# program: GarnetHangSample.zip
  2. Observe that after the initial failed SET, repeated GETs to the same key result in high CPU usage by the Garnet server process.
  3. Note that the CPU usage remains high until the server is restarted.

Expected behavior

Get attempts on keys that exceeded AofPageSize should not result in abnormal CPU usage.

Screenshots

Image

Release version

v1.1.5

Earlier versions as well. The following versions were tested: 1.1.0, 1.1.1, 1.1.2, 1.1.3 and 1.1.4

IDE

Visual Studio 2022
Visual Studio 2026

OS version

Windows Server 2025
Windows 11

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions