Skip to content
ClickHouse Docs

errors

Autogenerated from ClickHouse system tables

Description

Contains error codes with the number of times they have been triggered.

To show all possible error codes, including ones which were not triggered, set setting system_events_show_zero_values to 1.

Columns

  • name (String) — Name of the error (errorCodeToName).
  • code (Int32) — Code number of the error.
  • value (UInt64) — The number of times this error happened.
  • last_error_time (DateTime) — The time when the last error happened.
  • last_error_message (String) — Message for the last error.
  • last_error_format_string (String) — Format string for the last error.
  • last_error_trace (Array(UInt64)) — A stack trace of the last error. On ELF platforms except FreeBSD, addresses inside the main ClickHouse binary are stored as physical file offsets, and other addresses are virtual memory addresses inside the ClickHouse server process.
  • remote (UInt8) — Remote exception (i.e. received during one of the distributed queries).
  • query_id (String) — Id of a query that caused an error (if available).

Counters for some errors may increase during successful query execution. It’s not recommended to use this table for server monitoring purposes unless you are sure that corresponding error can not be a false positive.

Examples

Querysql
SELECT name, code, value
FROM system.errors
WHERE value > 0
ORDER BY code ASC
LIMIT 1

┌─name─────────────┬─code─┬─value─┐
│ CANNOT_OPEN_FILE │   76 │     1 │
└──────────────────┴──────┴───────┘
Responsesql
WITH arrayMap(x -> demangle(addressToSymbol(x)), last_error_trace) AS all
SELECT name, arrayStringConcat(all, '\n') AS res
FROM system.errors
LIMIT 1
SETTINGS allow_introspection_functions=1\G