Barvna shema: Svetla
Trenutno dejavna stran: start » en » Documentation » Data integration and data access » WKL Database Gateway » Troubleshooting » 429 "Die Anfrage bindet zu viele Einzelwerte." (The request binds too many individual values.)

429 "Die Anfrage bindet zu viele Einzelwerte." (The request binds too many individual values.)

A read request with a long condition is refused with 429 before it reaches the database.

Environment

Conditions with many values, such as IN (…) from Access via the driver or long OR chains.

Cause

SQL Server accepts at most 2,100 parameters in a parameterized statement (Microsoft: Maximum capacity specifications for SQL Server, „Parameters per stored procedure“); two of them are taken by sp_executesql, through which the service sends every statement. That leaves 2,098 for the caller's values. The service counts beforehand and refuses instead of truncating the condition. The response is 429 (limit exceeded), like the service's other quantity limits, not 400: the request is valid, it only exceeds what one statement can carry. The service combines more than 100 equality comparisons on the same column in one or into a single parameter; everything else—many different columns, comparisons with gt or lt, text search, short chains on many columns—counts value by value.

Resolution

  1. Phrase the condition as a list of values of one column (Nummer eq 1 or Nummer eq 2 … or IN (…)); then only the request body limits it (MaxBodyBytes, default 1 MB, as a guideline about 36,000 short numeric values).
  2. Split a condition over many different columns across several requests.
  3. Send long conditions in the body (POST …/$query); the driver does this by itself.

Verification

The request responds 200 with the same row count as the same condition in the database.

en/wiki/data-conectivity/database-gateway/troubleshooting/429-too-many-values.txt · Zadnja sprememba: uporabnika Wolfgang van der Stille