Skip to content

ClickHouse: text values over 128 KiB, or batches over 1 MiB of URL, fail to write #3777

Closed

Description

@datlechin

What happened?

Found while fixing #3765. The ClickHouse driver sends every text parameter as a param_pN URL item (ClickHousePluginDriver+Http.swift:220).

  • ClickHouse 25.8 refuses a field over http_max_field_value_size (128 KiB) with HTTP 500 "HTML Form Exception: Field value too long", and a URL over http_max_uri_size (1 MiB) with HTTP 400 and an empty body.
  • The import's batch budget counts raw bytes against 1 MiB (SQLWriteBatchBudget.swift:27), not the percent-encoded URL, so a batch it allows can exceed the URL limit.
  • Measured: 800 rows of an id and 1,100 bytes of text went out as one 1.2 MB URL and got HTTP 400. One 200,000-byte value got HTTP 500.

Steps to reproduce

  1. Import a CSV of 1,000 rows with a 1,100-character text column into a ClickHouse table: the first batch fails.
  2. Edit a cell to a 200 KB value and save: the save fails.

Expected behavior

Rows and values the server can store are written: long values travel in the request body, and the budget counts what the request carries.

Database type

ClickHouse

Platform

macOS

Activity

  1. added
    bug
    platform-macos
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions