Skip to main content

Error message

Example: defaults: max_bins must be between 2 and 100000, got 1

When this error occurs

The max_bins parameter in histogram options controls how many bins the frequency distribution uses. It must be an integer between 2 and 100,000 (inclusive). This error is raised when the value falls outside that range.

Example: request that triggers this error

A histogram with fewer than 2 bins is meaningless.

How to fix

Set max_bins to a value between 2 and 100,000. If omitted, the server defaults to 50:
Common values:
  • 50 (default) — good for most columns
  • 200–1000 — useful for high-cardinality categorical columns
  • 100,000 — maximum, for very granular distributions